BETTER-AUTH. UI
Mutations

requestPasswordResetOtpOptions

Email a password-reset 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.

Pair with resetPasswordOtpOptions, which takes the code and the new password together — no reset link is involved.

Options factory

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

const requestReset = createMutation(() => requestPasswordResetOtpOptions(authClient))

requestReset.mutate({ email: "[email protected]" })

Params

Prop

Type

Last updated on

On this page