Home > @firebase/auth > User > getIdTokenResult
User.getIdTokenResult() method
Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service.
Signature:
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
Parameters
Parameter | Type | Description |
---|---|---|
forceRefresh | boolean | Force refresh regardless of token expiration. |
Returns:
Promise<IdTokenResult>
Description
Returns the current token if it has not expired or if it will not expire in the next five minutes. Otherwise, this will refresh the token and return a new one.