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
Since a couple weeks we get the behavior that if we access the root address of our react-admin application it gets stuck on loading because in the AuthProvider a new behavior appeared: the checkError method can have an undefined error as input parameter.
Was there a change on how the AuthProvider checkError is being used?
Steps to reproduce:
Use the example AuthProvider implementation and call the root address.
This fixes the problem, but it feels a bit weird.
checkError: (error) => {
if (!error) {
return Promise.resolve();
}
const status = error.status;
// Revoke access_token if status in unauthorized
if (status === 401 || status === 403) {
OIDCUserManager.revokeAccessToken();
return Promise.reject({
message: "Authentication error. Please login again.",
});
}
return Promise.resolve();
},
Additionally, there seems to be a related issue on some internal code called Retryer where the onError function also acts on an undefined error input parameter as well as the useQuery call with the auth/getPermissions key wants to act on an undefined error while handling it in the onError method.
Environment
React-admin version: 4.16.17
Last version that did not exhibit the issue (if applicable): Not sure, however it did not appear a couple weeks ago.
The text was updated successfully, but these errors were encountered:
Hi, and thanks for your report. We need a reproduction to investigate on this bug. Can you please tweak the simple example (link below) and post a link to your modified sandbox?
Since a couple weeks we get the behavior that if we access the root address of our react-admin application it gets stuck on loading because in the AuthProvider a new behavior appeared: the
checkError
method can have an undefinederror
as input parameter.According to the docs this is not intended as shown in the example implementation: https://marmelab.com/react-admin/AuthProviderWriting.html
Was there a change on how the AuthProvider
checkError
is being used?Steps to reproduce:
Use the example AuthProvider implementation and call the root address.
This fixes the problem, but it feels a bit weird.
Additionally, there seems to be a related issue on some internal code called
Retryer
where theonError
function also acts on an undefinederror
input parameter as well as theuseQuery
call with theauth/getPermissions
key wants to act on an undefinederror
while handling it in theonError
method.Environment
The text was updated successfully, but these errors were encountered: