-
-
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
Authprovider getPermissions error #4073
Comments
Thanks for reporting this. If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:
|
@djhi Sorry. Since I'm using a private openId provider, I can't simulate the issue on CodeSandBox or GitHub. I can however provide some parts of our RA code. Will this help? |
Whether or not you use permissions, your authProvider must return a Promise for the |
@fzaninotto Thank you very much. It worked! I'm so sorry that I opened this issue, but reading the message and analyzing the code and the documentation I really thought it was a bug. Maybe it's a good idea to put in the documentation that this method MUST be defined regardles if you use it or not. Again, I'm sorry and thank you. |
The 3.0 documentation about the |
What you were expecting:
AuthProvider authentication using OpenID should work correctly in react admin version 3.0.1.
What happened instead:
React-Admin returning "TypeError: Cannot read property 'then' of undefined" on ra-core/esm/auth/usePermissions.js.
Specific line: https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/auth/usePermissions.ts#L53
Steps to reproduce:
I think that if you just try to use authprovider the problem will occur. If not, let me know, so that I can provide more info/code.
Related code:
https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/auth/usePermissions.ts#L53
Other information:
React Admin is a GREAT product, thank you so much.
I'm not even near an expert on react/react-admin, so be patience.
I have read the upgrade guide, and we don't use match, context or resource. Also, we don't use AUTH_GET_PERMISSIONS (don't use permissions at all). I think the issue is related to "The authProvider No Longer Receives Default Parameters" in the upgrade, but can't confirm. 9730e6c#diff-2786406d872b3d7bd9273d26f8b1d303
If this is not a bug, forgive me.
Environment
The text was updated successfully, but these errors were encountered: