@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
13 lines (12 loc) • 563 B
TypeScript
import { default as React, 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;