Firebase Hooksv0.2.0

useUpdatePassword

Change the password, with reauthentication built in.

const { update, loading, error, success } = useUpdatePassword();

await update(newPassword, { currentPassword }); // reauthenticates first
await update(newPassword); // no reauth — your call

Returns

update(newPassword, { currentPassword? }) resolves to { success: true } or a failure result. Also exposes loading, error, and success.

Reauthentication

Firebase rejects sensitive operations on a stale sign-in. Pass currentPassword and the hook reauthenticates first.

Omit it and the change runs directly, so a stale session surfaces auth/requires-recent-login through code and cause — handle it with useReauthenticate.

On this page