UNPKG

voluptasmollitia

Version:
30 lines (17 loc) 934 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [getIdTokenResult](./auth.getidtokenresult.md) ## getIdTokenResult() function Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service. <b>Signature:</b> ```typescript export declare function getIdTokenResult(user: User, forceRefresh?: boolean): Promise<IdTokenResult>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | user | [User](./auth.user.md) | The user. | | forceRefresh | boolean | Force refresh regardless of token expiration. | <b>Returns:</b> Promise&lt;[IdTokenResult](./auth.idtokenresult.md)<!-- -->&gt; ## Remarks 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.