UNPKG

@inertiapixel/nextjs-auth

Version:

A reusable Next.js authentication package supporting credentials, OTP, and OAuth login.

12 lines (11 loc) 423 B
export declare const useAuth: (redirectIfNotAuthenticated?: string) => { user: import("..").User<unknown> | null; isAuthenticated: boolean; loading: boolean; isLoaded: boolean; getToken: () => Promise<string>; loginError: string | null; login: (credentials: import("..").LoginPayload) => Promise<void>; logout: () => void; socialLogin: (payload: import("..").SocialProvider) => void; };