A component that wraps routes to protect them from unauthorized access.
It performs the following checks:
allowedRoles
The props for the component.
The child components, a redirect, a loading indicator, or an error page.
A component that wraps routes to protect them from unauthorized access.
It performs the following checks:
allowedRolesare specified, it checks if the authenticated user has one of the required roles. If not, it displays a 403 Forbidden error page.