Skip to content

Delay in updating user fields #637

Answered by kmjennison
kevinnammour asked this question in Q&A
Discussion options

You must be logged in to vote

Quick answer: After updating the Firebase user's name, call AuthUser.getIdToken(true) to force a token refresh, which will update claims and the AuthUser.displayName value.


This behavior is currently expected. Right now, the AuthUser value is only updated on the client when the ID token changes (see: useFirebaseUser, withAuthUser). Changes to things like display name will not automatically update the AuthUser.

One reason this is good is that it will keep the server-side and client-side AuthUser in sync. On the server side, the displayName value relies on the Firebase ID token's claims (source), and changes to claims are not automatically propagated to the client. If the ID token isn't re…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kevinnammour
Comment options

@kmjennison
Comment options

Answer selected by kevinnammour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants