@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
18 lines (17 loc) • 918 B
TypeScript
import { MutationOptions } from '@tanstack/query-core';
import { BetterFetchError } from 'better-auth/client';
import { AuthClient } from '../lib/auth-client';
export type LinkSocialParams<TAuthClient extends AuthClient> = Parameters<TAuthClient["linkSocial"]>[0];
export type LinkSocialOptions<TAuthClient extends AuthClient> = Omit<ReturnType<typeof linkSocialOptions<TAuthClient>>, "mutationKey" | "mutationFn">;
/**
* Mutation options factory for linking a social provider to the current user.
*
* @param authClient - The Better Auth client.
*/
export declare function linkSocialOptions<TAuthClient extends AuthClient>(authClient: TAuthClient): MutationOptions<Awaited<ReturnType<(params: LinkSocialParams<TAuthClient>) => Promise<{
url: string;
redirect: boolean;
}>>>, BetterFetchError, Parameters<(params: LinkSocialParams<TAuthClient>) => Promise<{
url: string;
redirect: boolean;
}>>[0]>;