-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
customRoutes are not allowed for unauthenticated users when the Admin is being used with renderProps #6342
Comments
Hello Gabriel, how are you doing? Look, the only thing I can help you with is share my app.js and my customRoutes.js:
Pay close attention to the Hopefully this information can be of use to you, greetings. |
I think I know what is happening. I think the issue is related to the authProvider, which is throwing an error when it is trying to the permissions when the user is not authenticated and it shouldn't |
Thanks for the detailed report. |
@gabrielperales In https://codesandbox.io/s/epic-kepler-cii3c, an error is happening because the See https://codesandbox.io/s/beautiful-lalande-5z7b0?file=/src/App.js |
What you were expecting:
I have some custom routes like
/recoverPassword
where I should be able to access when I'm not logged in.What happened instead:
I can't access that route and instead, it redirects to
/login
Steps to reproduce:
Admin
componentRelated code:
codesandbox.io/s/epic-kepler-cii3c
renderProps
workscodesandbox.io/s/determined-torvalds-l48rl
Other information:
Related issues :
The issue is produced by these lines of the code in
ra-core
package:https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/core/CoreAdminRouter.tsx#L47-L54
I think it shouldn't call
doLogout
in these https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/core/CoreAdminRouter.tsx#L82 but I have to do some tests.Environment
React-admin version:
"version": "3.16.0"
React version:
"version": "17.0.1"
The text was updated successfully, but these errors were encountered: