Mutations
useSignInUsername
Username/password sign-in mutation hook.
Requires the Better Auth username plugin. Import your configured authClient. It already carries the username methods from createAuthClient.
Usage
import { useSignInUsername } from "@better-auth-ui/solid/plugins/username"
const mutation = useSignInUsername(authClient)
mutation.mutate(/* params */)Options factory
import { signInUsernameOptions } from "@better-auth-ui/core/plugins/username"
import { useMutation } from "@tanstack/solid-query"
const signIn = useMutation(() => signInUsernameOptions(authClient))
signIn.mutate({ username: "alice", password: passwordInput })Params
Prop
Type
Last updated on