You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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$.
The text was updated successfully, but these errors were encountered:
However this is solved, this would be very useful for us. We have several components that rely on information coming from the response to loadUserProfile. As it stands, we're dealing with a race condition where a component is loaded before the user profile request completes. We can probably add something akin to your APP_INITIALIZER process. However (and this is untested and could be completely incorrect), I believe that if a user were to logout and log back in (not refreshing/reinitializing the app), then the user profile data would need to be re-requested and I'd be back in the same situation.
Anyway, I'm interested in a solution here and happy to provide more details of our situation to help develop one.
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$
.The text was updated successfully, but these errors were encountered: