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
returningObservable
; - asynchronous
isNotBannedGuard
returningPromise
; - synchronous
isUncompletedGuard
(returning aboolean
)
and a route defined like:
{
path: 'some-path',
component: SomePathComponent,
canActivate: [isLoggedGuard, isNotBannedGuard, isUncompletedGuard]
}
- How will it be handled? Will all guards be invoked at once and just one time?
- Is there any good way to make it's sequential so
isUncompletedGuard
guard will be checked afterisLoggedGuard
gives true?