@light-auth/core
Version:
light auth core framework agnostic, using arctic
21 lines (20 loc) • 1.02 kB
TypeScript
import { type LightAuthConfig, type BaseResponse, type LightAuthSession, type LightAuthUser } from "../models";
/**
* Creates the HTTP handlers (get, set) function for LightAuth.
* @param config The LightAuth configuration object.
* @returns An HTTP handler function that processes requests and responses.
*/
export declare function createHttpHandlerFunction<Session extends LightAuthSession = LightAuthSession, User extends LightAuthUser<Session> = LightAuthUser<Session>>(config: LightAuthConfig<Session, User>): (args?: {
[key: string]: unknown;
}) => Promise<BaseResponse>;
export * from "./logout";
export * from "./provider-callback";
export * from "./redirect-to-provider";
export { getCsrfToken as retrieveCsrfTokenHandler } from "./retrieve-csrf";
export * from "./retrieve-session";
export * from "./retrieve-user";
export * from "./save-session";
export * from "./save-user";
export * from "./credentials-login";
export * from "./credentials-register";
export * from "./credentials-reset-password";