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