MonoCloud Authentication SDK
    Preparing search index...

    Props for the <Protected /> component.

    interface ProtectedComponentProps {
        children: ReactNode;
        fallback?: ReactNode;
        groups?: string[];
        groupsClaim?: string;
        matchAllGroups?: boolean;
        onGroupAccessDenied?: (user: MonoCloudUser) => ReactNode;
    }
    Index

    Properties

    children: ReactNode

    Content to render when access is allowed.

    fallback?: ReactNode

    Content to render when the user is not authenticated.

    groups?: string[]

    Groups required to view the protected content. By default, the user must belong to any of the specified groups.

    groupsClaim?: string

    Name of the claim that contains groups in the user profile.

    'groups'
    
    matchAllGroups?: boolean

    If true, the user must belong to all specified groups (instead of any).

    false
    
    onGroupAccessDenied?: (user: MonoCloudUser) => ReactNode

    Rendered when the user is authenticated but does not meet the groups requirement. If omitted, nothing is rendered (or fallback is used only for unauthenticated users).