I have an application that I am building that implements CanActivate on the dashboard route. It works fine accept on page reload, I check a flag in the user service to see i
I solved it like this and used it in my AuthGuard
isLoggedIn(): Observable { return this.afAuth.authState .pipe( take(1), map(user => { return !!user; }, () => { return false; } ), tap(loggedIn => { if (!loggedIn) { this.router.navigate(['/']); } } )); }