Skip to content
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

addRefreshAuthToAuthProvider fails with Cannot read properties of undefined (reading 'apply') #8808

Closed
OoDeLally opened this issue Apr 5, 2023 · 2 comments · Fixed by #8810
Labels

Comments

@OoDeLally
Copy link
Contributor

What you were expecting:
Should run fine as long as I respect AuthProvider's typing

What happened instead:

Cannot read properties of undefined (reading 'apply')

Steps to reproduce:

  • Create a AuthProvider without a getIdentity (according to the typing, getIdentity is optional)
  • addRefreshAuthToAuthProvider fails at return provider[name.toString()](...args); when provider does not have getIdentity and name is getIdentity.
@djhi
Copy link
Collaborator

djhi commented Apr 5, 2023

Thanks for reporting this. Please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple).

@djhi
Copy link
Collaborator

djhi commented Apr 5, 2023

Nevermind, I see the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants