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
In https://marmelab.com/react-admin/Authentication.html#the-authprovider, you give the spec of the AuthProvider, specifying that each method should return Promise.resolve(). At first, second and third read, for me and my workmate it meant "the methods should return a Promise". After trying to return Promise.reject("something") many times and reading a bit of the source (for example useLogout and checkAuth), it's clear that the logout method must use Promise.resolve and doesn't support Promise.reject. But checkAuth does support Promise.reject.
It would be nice to clarify what exactly is supposed to be returned from these functions.
The text was updated successfully, but these errors were encountered:
Hello,
In https://marmelab.com/react-admin/Authentication.html#the-authprovider, you give the spec of the AuthProvider, specifying that each method should return
Promise.resolve()
. At first, second and third read, for me and my workmate it meant "the methods should return a Promise". After trying to returnPromise.reject("something")
many times and reading a bit of the source (for exampleuseLogout
andcheckAuth
), it's clear that thelogout
method must usePromise.resolve
and doesn't supportPromise.reject
. ButcheckAuth
does supportPromise.reject
.It would be nice to clarify what exactly is supposed to be returned from these functions.
The text was updated successfully, but these errors were encountered: