UNPKG

caplib

Version:

Credentialless Authentication Protocol Library for Web Applications

17 lines (14 loc) 696 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; import { b as AuthProviderProps, U as User } from './types-B5TgxFMm.mjs'; interface AuthContextType { user: User | null; isAuthenticated: boolean; showAuthModal: () => void; hideAuthModal: () => void; logout: () => void; } declare function AuthProvider({ children, config, onAuthSuccess, onAuthError, }: AuthProviderProps): react_jsx_runtime.JSX.Element; declare function useAuth(): AuthContextType; declare function withAuth<P extends object>(WrappedComponent: React.ComponentType<P>): (props: P) => react_jsx_runtime.JSX.Element; export { AuthProvider as A, useAuth as u, withAuth as w };