UNPKG

@adonis-agora/authkit-react

Version:

Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.

13 lines (12 loc) 652 B
import { type ReactNode } from 'react'; import { type AuthkitConfig } from './config.js'; import type { AuthSharedProps } from './types.js'; export interface AuthkitProviderProps { config?: AuthkitConfig; value?: AuthSharedProps['authkit']; children: ReactNode; } export declare function AuthkitProvider({ config, value, children }: AuthkitProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<import("./config.js").ResolvedAuthkitConfig>> | import("react").FunctionComponentElement<import("react").ProviderProps<{ user: import("./types.js").AuthUser | null; globalRoles: string[]; } | undefined>>;