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 > updatePassword

updatePassword() function

Updates the user's password.

Signature:

export declare function updatePassword(user: User, newPassword: string): Promise<void>;

Parameters

Parameter Type Description
user User The user.
newPassword string The new password.

Returns:

Promise<void>

Description

Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call reauthenticateWithCredential().