Firebase Hooksv0.2.0

useConfirmPasswordReset

Complete a reset from the emailed oobCode.

Runs on the page your reset email links to, using the oobCode from the URL.

const { confirm, verifyCode, success, error } = useConfirmPasswordReset();

const check = await verifyCode(oobCode); // { success: true, email: "a@b.c" }
await confirm(oobCode, newPassword);

Returns

confirm(oobCode, newPassword) resolves to { success: true } or a failure result.

verifyCode(oobCode) optionally checks the code first and resolves to { success: true, email }, so the page can show whose password is being reset before asking for a new one.

Also exposes loading, error, success, and resetState.

On this page