Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderAuthFailed when present displays before before permission and roles validation is checked #1

Open
Maxwell-ihiaso opened this issue Feb 8, 2024 · 0 comments

Comments

@Maxwell-ihiaso
Copy link

When a user passes a component to be rendered as renderAuthFailed Props, this component is triggered a couple of seconds before the role and permission validation kicks in

Code sample

<AllowedAccess
      roles={[MODULE.DASHBOARD?.toLowerCase()]}
      renderAuthFailed={<p>Not Allowed to see this!</p>}
      isLoading={
        <Stack justifyContent="center" alignItems="center" height="50dvh">
          <CircularProgress color="primary" />
        </Stack>
      }
    >
    <SomeComponent />
       </AllowedAccess>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant