@light-auth/astro
Version:
light auth framework for astro, using arctic
13 lines (12 loc) • 1 kB
TypeScript
import { type LightAuthConfig, type LightAuthSession, type LightAuthUser } from "@light-auth/core/client";
type LightAuthConfigClient = Pick<LightAuthConfig<LightAuthSession, LightAuthUser<LightAuthSession>>, "basePath" | "env">;
export declare function CreateLightAuthClient<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config?: LightAuthConfigClient | undefined): {
basePath: string;
getAuthSession: () => Promise<LightAuthSession | null | undefined>;
setAuthSession: (session: LightAuthSession) => Promise<LightAuthSession | null | undefined>;
getUser: (providerUserId?: string) => Promise<LightAuthUser<LightAuthSession> | null>;
setUser: (user: LightAuthUser<LightAuthSession>) => Promise<LightAuthUser<LightAuthSession> | null | undefined>;
signIn: (providerName?: string, callbackUrl?: string) => Promise<any>;
signOut: (revokeToken?: boolean, callbackUrl?: string) => Promise<any>;
};
export {};