// import { useAuthContext } from '@octanner/prism-utilities';() => {const SomeComponent = () => {const context = useAuthContext();return <div>Status: {context.status}</div>}return (<AuthContextProvider userInfoUri={'/user-info'}><SomeComponent /></AuthContextProvider>)};
Prop | Type | Default | Description |
---|---|---|---|
children | ReactNode | Typically most of the application. | |
userInfoUri | string | undefined | The uri to the user-info endpoint, this endpoint must return the accessToken, decodedAccessToken, & permissions. The fe-image hosts this at `{subpath}/oauth/user-info`. `userInfoUri` or `authUserGetter` is required. | |
authUserGetter | IAuthUserInfoGetter | undefined | An interface that must implement the `getUserInfo` function which returns Promise<AuthUserInfo>. `userInfoUri` or `authUserGetter` is required. |