UNPKG

voluptasmollitia

Version:
29 lines (16 loc) 799 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [User](./auth.user.md) &gt; [getIdToken](./auth.user.getidtoken.md) ## User.getIdToken() method Returns a JSON Web Token (JWT) used to identify the user to a Firebase service. <b>Signature:</b> ```typescript getIdToken(forceRefresh?: boolean): Promise<string>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | forceRefresh | boolean | Force refresh regardless of token expiration. | <b>Returns:</b> Promise&lt;string&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.