UNPKG

react-cookie-auth

Version:

Authentication library with HTTP-only cookies and Page Visibility API for handling sleep/wake cycles

13 lines (12 loc) 749 B
import { AuthLibConfig, AuthLibInstance } from './utils/types'; export * from './components'; export type { AuthErrorType, User, AuthState, AuthLibConfig, AuthLibInstance, AuthStore, AuthHooks, AuthActions, AuthSelectors, } from './utils/types'; export { getAuthErrorMessage, isAuthError, getAuthErrorType } from './utils/errors'; export { getItemFromStorage, setItemToStorage, removeItemFromStorage, clearAuthStorage, } from './utils/storage'; /** * Initialize the authentication library with the given configuration * * @param config The configuration for the authentication library * @returns An object containing Redux store, hooks, and API endpoints */ export declare function initAuth(config: AuthLibConfig): AuthLibInstance;