[ ] Regression
[ ] Bug report
[ X ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
I have all my routes secured.
app.useGlobalGuards(new (AuthGuard('jwt'))());
It could be usefull have a decorator: @AuthException() wich unsecure a route.
If you have a completely private api and you want to unsecure authenticate route
[System Information]
OS Version : Windows 7
NodeJS Version : v10.0.0
NPM Version : 6.0.0
[Nest Information]
microservices version : *
websockets version : *
mongoose version : 4.0.0
passport version : 1.0.10
swagger version : 2.0.0
testing version : *
common version : *
core version : *
One solution you can try would be to use your AuthGuard
at the controller level.
In the controller where you need to remove the auth restriction, use AuthGuard
at the route level, so that your unrestricted route doesn't have the AuthGuard
.
I have two controller, one with guard and other one without it but it is not exactly what I want to do. This is a heritable big project and I need to do this as simple as I am able to do.
My others apps are with GlobalGuards and I'm trying to keep the same architecture.
I will try a custom decorator but I don't know if it will be posible
This feature would make it possible. Let's track this issue, this is something that I definitely want to do in the near future.
Any advances on this feature?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This feature would make it possible. Let's track this issue, this is something that I definitely want to do in the near future.