Skip to main content

useChangePassword()

Overload 1 of 2

Use the hook useChangePassword to change password for the user.

const { changePassword, isLoading, isSuccess, isError, error } =
useChangePassword()

console.log({ isLoading, isSuccess, isError, error })

const handleFormSubmit = async (e) => {
e.preventDefault()

await changePassword('my-new-password')
}

Parameters


This overload doesn't accept any arguments.

Overload 2 of 2

Use the hook useChangePassword to change password for the user.

const { changePassword, isLoading, isSuccess, isError, error } =
useChangePassword()

console.log({ isLoading, isSuccess, isError, error })

const handleFormSubmit = async (e) => {
e.preventDefault()

await changePassword('my-new-password')
}

Parameters


email optional string