Const
ForceAuth renders its children if the current user is authenticated. If the user is not authenticated, a AuthFallback will be presented to the user.
ForceAuth
AuthFallback
The implementation of the AuthFallback depends on the authentication plugin used by the application (see AuthPlugin).
For an application that requires the user to always be logged in, simply surround the entire application UI with the ForceAuth component:
import { ForceAuth } from "@open-pioneer/authentication";export function AppUI() { return ( <ForceAuth> <TheRestOfYourApplication /> </ForceAuth> );} Copy
import { ForceAuth } from "@open-pioneer/authentication";export function AppUI() { return ( <ForceAuth> <TheRestOfYourApplication /> </ForceAuth> );}
ForceAuthrenders its children if the current user is authenticated. If the user is not authenticated, aAuthFallbackwill be presented to the user.The implementation of the
AuthFallbackdepends on the authentication plugin used by the application (see AuthPlugin).For an application that requires the user to always be logged in, simply surround the entire application UI with the
ForceAuthcomponent: