Вы можете добавить tap
в Observable pipe
в AuthGuard, например:
return this.authService.checkAuthentication().pipe(
tap(authenticated => {
if (!authenticated) {
// Add your redirect in here
}
})
);
Таким образом, вы можете отреагировать на значение Observable
, прежде чем вернуть его.