voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
30 lines (17 loc) • 1 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [reauthenticateWithCredential](./auth.reauthenticatewithcredential.md)
## reauthenticateWithCredential() function
Re-authenticates a user using a fresh credential.
<b>Signature:</b>
```typescript
export declare function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| user | [User](./auth.user.md) | The user. |
| credential | [AuthCredential](./auth.authcredential.md) | The auth credential. |
<b>Returns:</b>
Promise<[UserCredential](./auth.usercredential.md)<!-- -->>
## Remarks
Use before operations such as [updatePassword()](./auth.updatepassword.md) that require tokens from recent sign-in attempts. This method can be used to recover from a CREDENTIAL\_TOO\_OLD\_LOGIN\_AGAIN error.