In the main service of this sample we load the User Profile like this:
|
this.oauthService.events |
|
.pipe(filter(e => ['token_received'].includes(e.type))) |
|
.subscribe(e => this.oauthService.loadUserProfile()); |
I suspect some people will want to "wait" for the profile to be loaded before doing stuff. So it might make sense to add isUserProfileLoaded$ observable similar to isAuthenticated$ and isDoneLoading$.
In the main service of this sample we load the User Profile like this:
sample-angular-oauth2-oidc-with-auth-guards/src/app/core/auth.service.ts
Lines 73 to 75 in 4ee8e28
I suspect some people will want to "wait" for the profile to be loaded before doing stuff. So it might make sense to add
isUserProfileLoaded$observable similar toisAuthenticated$andisDoneLoading$.