Closed
Description
Version info
Angular: 11.0.0
Firebase: 8.1.1
AngularFire: 6.1.1
How to reproduce these conditions
Steps to set up and reproduce
If I use AngularFire 6.1.0 or later, my authGuardPipe seems to be invoked before the user is fully signed in. claims
is empty after signin. If I reload the page, claims
is populated. This is also the case if I look at the user object.
const redirectToChangePassword = () => pipe(customClaims, map(claims => {
console.log(claims);
return claims.hasSetPassword ?? ['/auth/change-password'];
}));
{
path : 'pages',
loadChildren: () => import('./main/pages/pages.module').then(m => m.PagesModule),
canActivate: [AngularFireAuthGuard],
data: { authGuardPipe: redirectToChangePassword },
resolve: {
data: AuthService,
}
},
6.1.0-rc.4 works as expected, so something has changed between rc.4 and 6.1.0.
Metadata
Metadata
Assignees
Labels
No labels