BETTER-AUTH. UI
Mutations

resetPasswordOtpOptions

Reset a password with an emailed code.

Requires the Better Auth email-OTP plugin. If TypeScript cannot infer the plugin methods from your client, type or cast authClient as EmailOtpAuthClient from @better-auth-ui/solid.

There is no token in the URL — the code and the new password are submitted in one call.

Options factory

import { resetPasswordOtpOptions } from "@better-auth-ui/solid"
import { createMutation } from "@tanstack/solid-query"

const resetPassword = createMutation(() => resetPasswordOtpOptions(authClient))

resetPassword.mutate({
  email: "[email protected]",
  otp: "123456",
  password: "new-password"
})

Params

Prop

Type

Last updated on

On this page