You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You eventually land on the same react-router 404 view, but at path /authentication-error. This redirect took a few seconds whereas the false access control result redirected instantly; seems tangential, even irrelevant, but noting for completeness, in case an unexpected behavior.
What you were expecting:
false
result from my auth provider'scanAccess
to redirect me to the built-in access denied viewWhat happened instead:
Steps to reproduce:
Given:
basename="/admin"
prop to react-admin'sAdmin
elementauthProvider.canAccess
/admin/users
You'll land on
/access-denied
, not/admin/access-denied
and see react-router's built-in 404 viewThe same issue applies to the auth error redirect, too. For example, if you modify
canAccess
as follows:You eventually land on the same react-router 404 view, but at path
/authentication-error
. This redirect took a few seconds whereas the false access control result redirected instantly; seems tangential, even irrelevant, but noting for completeness, in case an unexpected behavior.Related code:
Minimal example repo: https://github.com/zemccartney/ra-route-redir-repro/tree/main
Other information:
Environment
The text was updated successfully, but these errors were encountered: