Mutations
useResetPhoneNumberPassword
Reset a phone credential password with a verification code.
Usage
import type { PhoneNumberAuthClient } from "@better-auth-ui/core/plugins/phone-number"
import { useAuth } from "@better-auth-ui/solid"
import { useResetPhoneNumberPassword } from "@better-auth-ui/solid/plugins/phone-number"
const { authClient } = useAuth()
const resetPassword = useResetPhoneNumberPassword(
authClient as PhoneNumberAuthClient
)
resetPassword.mutate({
phoneNumber: "+12025550123",
otp: "123456",
newPassword
})Options factory
import { resetPhoneNumberPasswordOptions } from "@better-auth-ui/core/plugins/phone-number"
import { useMutation } from "@tanstack/solid-query"
const resetPassword = useMutation(() =>
resetPhoneNumberPasswordOptions(authClient)
)Params
Prop
Type
Last updated on