The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

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.