voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (16 loc) • 886 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [User](./auth.user.md) > [getIdTokenResult](./auth.user.getidtokenresult.md)
## User.getIdTokenResult() method
Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service.
<b>Signature:</b>
```typescript
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| forceRefresh | boolean | Force refresh regardless of token expiration. |
<b>Returns:</b>
Promise<[IdTokenResult](./auth.idtokenresult.md)<!-- -->>
## 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.