useAuthContext

retrieve the AuthContext context

ArgumentList:

No arguments

    Returns:

     The AuthContext to retrieve the accessToken, decodedAccessToken, & permissions

    Examples

    Basic Usage

    This hook retrieves the AuthContext. Must be used within a <AuthContextProvider>.

    // import { useAuthContext } from '@octanner/prism-utilities';
    () => {
    const SomeComponent = () => {
    const context = useAuthContext();
    return <div>Status: {context.status}</div>
    }
    return (
    <AuthContextProvider userInfoUri={'/user-info'}>
    <SomeComponent />
    </AuthContextProvider>
    )
    };