UNPKG

@rent-the-runway/rtr-react-okta-auth

Version:

React hooks library for interacting with Okta. Lock out UI and Routes based on user authentication and the okta-user-groups the user belongs to. Can also lock out UI or Routes based on Claims.

15 lines (14 loc) 487 B
import * as React from 'react'; import { IOktaContext } from '@okta/okta-react/bundles/types/OktaContext'; interface Props { authCtx: IOktaContext; } interface IRtrOktaAuthUserCtx { user: any | null; userGroups: string[]; authorizationStateKnown: boolean; authCtx: IOktaContext; } export declare function useRtrOktaUserCtx({ authCtx }: Props): IRtrOktaAuthUserCtx; export declare const RtrOktaAuthContext: React.Context<IRtrOktaAuthUserCtx>; export {};