@light-auth/core
Version:
light auth core framework agnostic, using arctic
25 lines (24 loc) • 1.97 kB
TypeScript
import { type LightAuthConfig, type BaseResponse, type LightAuthSession, type LightAuthUser } from "../models";
export declare function createSigninClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (args?: {
providerName?: string;
callbackUrl?: string;
[key: string]: unknown;
}) => Promise<BaseResponse>;
export declare function createSignoutClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (args?: {
revokeToken?: boolean;
callbackUrl?: string;
[key: string]: unknown;
}) => Promise<BaseResponse>;
export declare function createFetchSessionClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (args?: {
[key: string]: unknown;
}) => Promise<Session | null | undefined>;
export declare function createSetSessionClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (session: Session, args?: {
[key: string]: unknown;
}) => Promise<Session | null | undefined>;
export declare function createFetchUserClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (args?: {
providerUserId?: string;
[key: string]: unknown;
}) => Promise<User | null>;
export declare function createSetUserClientFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (user: User, args?: {
[key: string]: unknown;
}) => Promise<User | null | undefined>;