UNPKG

@trimble-oss/trimble-id-react

Version:

> **Important Notice:** > > As of version 1.0.0, `PersistentOptions` have been removed. By default, the SDK now supports in-memory token storage. > > When you upgrade to version 1.x, storage options will no longer be available, resulting in a breaking

14 lines (13 loc) 572 B
import React from 'react'; import { ReactElement } from 'react'; interface IAuthenticationGuard { renderComponent: ReactElement; loader?: ReactElement; } /** * Renders a component if the user is authenticated, otherwise redirects the user to the login page. * @param renderComponent The component to render if the user is authenticated * @param loader The component to render while TIDProvider is loading */ export declare const AuthenticationGuard: ({ renderComponent, loader }: IAuthenticationGuard) => React.JSX.Element; export default AuthenticationGuard;