UNPKG

whodis-react

Version:

React hooks and components for secure, best practices authentication in seconds

30 lines (29 loc) 1 kB
import { ReactChild, ReactChildren } from 'react'; import { WhodisAuthTokenStorage } from '../../domain/WhodisAuthTokenStorage'; /** * a provider component which adds and manages the whodis AuthenticationContext */ export declare const AuthenticationProvider: ({ children, storage, directoryUuid, clientUuid, override, }: { children: ReactChild | ReactChildren; /** * the storage in which to store the whodis auth token * * note * - this is what enables this library to be used for both `react-browser` and `react-native` */ storage: WhodisAuthTokenStorage; /** * the whodis directory uuid under which to make requests to the whodis api */ directoryUuid: string; /** * the whodis client uuid via which to make requests to the whodis api */ clientUuid: string; /** * overrides to apply to requests for advanced usecases */ override?: { hostname?: string | undefined; } | undefined; }) => JSX.Element;