Skip to content Skip to sidebar Skip to footer

Firebase: Why Am I Getting Firebase Id Tokens Twice?

Question From the following situations, I could see two different tokens: After completing the sign-up, I get the first Firebase ID Token. I'm getting a new JWT when I come back t

Solution 1:

To get a new ID token with the latest claims after you update the profile via updateProfile, you can simply force token refresh by calling: currentUser.getIdToken(true).

Note, naturally on token refresh when the token is expired, the new token will automatically pick up the latest claims with the profile changes. To get this immediately, you can force refresh.

Post a Comment for "Firebase: Why Am I Getting Firebase Id Tokens Twice?"