Home > @firebase/auth > reauthenticateWithCredential
reauthenticateWithCredential() function
Re-authenticates a user using a fresh credential.
Signature:
export declare function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
Parameters
Parameter | Type | Description |
---|---|---|
user | User | The user. |
credential | AuthCredential | The auth credential. |
Returns:
Promise<UserCredential>
Description
Use before operations such as updatePassword() that require tokens from recent sign-in attempts. This method can be used to recover from a CREDENTIAL_TOO_OLD_LOGIN_AGAIN error.