UNPKG

@ttoss/react-auth

Version:

ttoss authentication module for React apps.

25 lines (20 loc) 899 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { AuthProps as AuthProps$1, AuthData } from '@ttoss/react-auth-core'; export { useAuth } from '@ttoss/react-auth-core'; import * as React from 'react'; type AuthProps = Pick<AuthProps$1, 'signUpTerms' | 'logo' | 'layout'> & { /** * Callback function invoked when an error occurs during authentication operations. * Receives the error object that was caught. */ onError?: (error: Error) => void; }; declare const Auth: (props: AuthProps) => react_jsx_runtime.JSX.Element; declare const AuthProvider: (props: { children: React.ReactNode; }) => react_jsx_runtime.JSX.Element; declare const getAuthData: ({ includeTokens, }?: { includeTokens?: boolean; }) => Promise<AuthData | null>; declare const checkAuth: () => Promise<boolean>; export { Auth, type AuthProps, AuthProvider, checkAuth, getAuthData };