UNPKG

@magikauth/core

Version:

MagikAuth SDK – Auth in 2 min. Plug & Play auth for any JS framework.

24 lines (21 loc) 623 B
type AuthResponse = { success: boolean; message?: string; token?: string; user?: any; }; type FlowOptions = { allowPasswordIfNewUser?: boolean; }; declare function MagikAuth(): { session: { set(token: string): void; get(): string | null; clear(): void; }; loginWithPassword(email: string, password: string): Promise<AuthResponse>; sendOtp(email: string): Promise<AuthResponse>; verifyOtp(email: string, otp: string, options?: FlowOptions): Promise<AuthResponse>; setPassword(password: string): Promise<AuthResponse>; }; export { MagikAuth as default };