@adonis-agora/authkit-react
Version:
Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.
12 lines (11 loc) • 626 B
TypeScript
import { QueryClient } from '@tanstack/react-query';
import { type ReactNode } from 'react';
import { type AuthkitClient, type AuthkitClientOptions } from './client.js';
export declare function useAuthkitClient(): AuthkitClient;
export interface AuthkitClientProviderProps {
client?: AuthkitClient;
opts?: AuthkitClientOptions;
children: ReactNode;
}
export declare function AuthkitClientProvider({ client, opts, children }: AuthkitClientProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<AuthkitClient | null>>;
export declare function createAuthkitQueryClient(): QueryClient;