UNPKG

cosmic-authentication

Version:

Authentication library for cosmic.new. Designed to be used and deployed on cosmic.new

24 lines 608 B
export interface UserData { uid: string; displayName: string; email: string; [key: string]: string | number | boolean | null | undefined; } export interface AuthState { isAuthenticated: boolean; user: UserData | null; } export interface CosmicAuthConfig { protectedRoutes?: string[]; loginPath?: string; clientId?: string; } export interface AuthContextType { isAuthenticated: boolean; user: UserData | null; signIn: () => void; signOut: () => void; checkAuthStatus: () => Promise<AuthState>; loading: boolean; } //# sourceMappingURL=index.d.ts.map