Sign in

Type: ProtectedComponentProps

Props for the <Protected /> component.

Properties

PropertyTypeDescription
childrenReactNodeContent to render when access is allowed.
fallback?ReactNodeContent 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?stringName of the claim that contains groups in the user profile.
matchAllGroups?booleanIf true, the user must belong to all specified groups (instead of any).
onGroupAccessDenied?(user: MonoCloudUser) => ReactNodeRendered 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).
© 2024 MonoCloud. All rights reserved.