UNPKG

@light-auth/core

Version:

light auth core framework agnostic, using arctic

23 lines (22 loc) 893 B
import type { LightAuthServerEnv } from "./light-auth-server-env"; import { type LightAuthSession } from "./light-auth-session"; export interface LightAuthSessionStore { getSession: <Session extends LightAuthSession = LightAuthSession>(args: { env: LightAuthServerEnv; basePath: string; [key: string]: unknown; }) => Session | null | Promise<Session | null>; setSession: <Session extends LightAuthSession = LightAuthSession>(args: { env: LightAuthServerEnv; basePath: string; session: Session; [key: string]: unknown; }) => Promise<Session> | Session; deleteSession: <Session extends LightAuthSession = LightAuthSession>(args: { env: LightAuthServerEnv; basePath: string; session: Session; [key: string]: unknown; }) => Promise<void> | void; generateSessionId: () => string; }