1

I wonder how the Angular's authorization check flow looks like. Let's say I have following authentication guards (classes implementing the CanActivate interface):

  • asynchronous isLoggedGuard returning Observable;
  • asynchronous isNotBannedGuard returning Promise;
  • synchronous isUncompletedGuard (returning a boolean)

and a route defined like:

  {
    path: 'some-path',
    component: SomePathComponent,
    canActivate: [isLoggedGuard, isNotBannedGuard, isUncompletedGuard]
  }
  1. How will it be handled? Will all guards be invoked at once and just one time?
  2. Is there any good way to make it's sequential so isUncompletedGuard guard will be checked after isLoggedGuard gives true?
Daniel Kucal
  • 8,684
  • 6
  • 39
  • 64

0 Answers0