Questions tagged [angular-guards]

123 questions
-1
votes
2 answers

Angular how do I use await with .subscribe

I am currently building a route guard that checks if my client is authenticated. Since I am using http only cookies I have to send a request to my server which then returns if the cookie is valid or not. This is the code for my guard: export class…
Kleecarim
  • 117
  • 1
  • 1
  • 7
-1
votes
1 answer

Guard always return true

I have two pretty similar guards in angular app. First of them checking is User logged in: // isUser guard export class isUser implements CanActivate { constructor( private fireAuth: AngularFireAuth, private router: Router ) {} …
-2
votes
1 answer

asynchronous code in an Angular guard doesn't open page

The setup is simple. I have a guard that guards a route. If the user's property locationSaved === true then we want to allow the user to enter the page. If the first check of the browser token is false we want to make an HTTP request to see if…
tilly
  • 2,229
  • 9
  • 34
  • 64
1 2 3
8
9