@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
12 lines (11 loc) • 955 B
TypeScript
import { MutationOptions } from '@tanstack/query-core';
import { BetterFetchError } from 'better-auth/client';
import { AuthClient } from '../lib/auth-client';
export type RevokeOtherSessionsParams<TAuthClient extends AuthClient> = Parameters<TAuthClient["revokeOtherSessions"]>[0];
export type RevokeOtherSessionsOptions<TAuthClient extends AuthClient> = Omit<ReturnType<typeof revokeOtherSessionsOptions<TAuthClient>>, "mutationKey" | "mutationFn" | "meta">;
/** Mutation options factory for revoking every session except the current one. */
export declare function revokeOtherSessionsOptions<TAuthClient extends AuthClient>(authClient: TAuthClient, userId?: string): MutationOptions<Awaited<ReturnType<(params?: void | RevokeOtherSessionsParams<TAuthClient> | undefined) => Promise<{
status: boolean;
}>>>, BetterFetchError, Parameters<(params?: void | RevokeOtherSessionsParams<TAuthClient> | undefined) => Promise<{
status: boolean;
}>>[0]>;