Mutations
useUnlinkAccount
Unlink a social provider from the current user.
Refetches the linked accounts list on success.
Usage
import { authClient } from "@/lib/auth-client"
import { useUnlinkAccount } from "@better-auth-ui/react"
const { mutate: unlinkAccount } = useUnlinkAccount(authClient)
unlinkAccount({ providerId: "github", accountId: "acc_123" })Options factory
import { unlinkAccountOptions } from "@better-auth-ui/core"
import { useMutation } from "@tanstack/react-query"
const { mutate } = useMutation(unlinkAccountOptions(authClient))Params
Prop
Type
Last updated on