question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support canActivate Guards on routes

See original GitHub issue

It is kind of hard to defined Guards (e.g., AuthGuard) at global level but exclude at specific route with standard @nestjs. it would be nice if this package provide a way to define canActivate with route definition so that we can have some control over customizing enforcing guards declaratively.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
kamilmysliwieccommented, Mar 8, 2019

APP_GUARD is a global guard. We should introduce a sort of MODULE_GUARD in this case.

2reactions
xmlkingcommented, Jul 15, 2018

Agree, most of us adding guards via APP_GUARD and activating via decorators. My concern was in general how nestjs handle multiple global guards as I am asking for clarification here https://github.com/nestjs/nest/issues/873

Read more comments on GitHub >

github_iconTop Results From Across the Web

CanActivate - Angular
Interface that a class can implement to be a guard deciding if a route can be activated. If all guards return true ,...
Read more >
Angular CanActivate Guard Example - TekTutorialsHub
The Angular CanActivate guard decides, if a route can be activated ( or component gets rendered). We use this guard, when we want...
Read more >
Angular Basics: CanActivate—Introduction to Routing Guards
Angular route guards are interfaces provided by Angular which, when implemented, allow us to control the accessibility of a route based on ...
Read more >
Implementing Route Protection in Angular using CanActivate
Angular supports route protection via route guards. A route guard validates a route and activates it only if authorized.
Read more >
Angular Routing Guards: Understanding canActivate Guard ...
The canActivate guard checks if the user can visit the specific route or we have to prevent access to that specific route. We...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found