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.

5 lines (4 loc) 348 B
import type { AuthUser } from './types.js'; export declare function hasGlobalRole(user: AuthUser | null | undefined, role: string): boolean; export declare function hasAnyGlobalRole(user: AuthUser | null | undefined, roles: string[]): boolean; export declare function hasAllGlobalRoles(user: AuthUser | null | undefined, roles: string[]): boolean;