BETTER-AUTH. UI
Mutations

useResetPassword

Complete the password reset flow with a token.

Usage

import { useAuth, useResetPassword } from "@better-auth-ui/react"

const { authClient } = useAuth()
const { mutate: resetPassword } = useResetPassword(authClient)

resetPassword({
  newPassword: "hunter3",
  token
})

Options factory

import { resetPasswordOptions } from "@better-auth-ui/react"
import { useMutation } from "@tanstack/react-query"

const { mutate } = useMutation(resetPasswordOptions(authClient))

Params

Prop

Type

Last updated on

On this page