@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
20 lines (19 loc) • 1 kB
TypeScript
import { MutationOptions } from '@tanstack/query-core';
import { BetterFetchError } from 'better-auth/client';
import { AuthClient } from '../lib/auth-client';
export type SignOutParams<TAuthClient extends AuthClient> = Parameters<TAuthClient["signOut"]>[0];
export type SignOutOptions<TAuthClient extends AuthClient> = Omit<ReturnType<typeof signOutOptions<TAuthClient>>, "mutationKey" | "mutationFn" | "meta">;
/**
* Mutation options factory for signing out.
*
* @param authClient - The Better Auth client.
*/
export declare function signOutOptions<TAuthClient extends AuthClient>(authClient: TAuthClient): MutationOptions<Awaited<ReturnType<(params?: void | SignOutParams<TAuthClient> | undefined) => Promise<{
success: boolean;
url: string | undefined;
redirect: boolean | undefined;
}>>>, BetterFetchError, Parameters<(params?: void | SignOutParams<TAuthClient> | undefined) => Promise<{
success: boolean;
url: string | undefined;
redirect: boolean | undefined;
}>>[0]>;