Description
Prerequisites
- I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate
- I have checked the latest version of the library to replicate my issue
- I have read the contributing guidelines
- I agree to the terms within the code of conduct
Describe the issue
We have noticed, usually after a refresh of our application, an error being logged to the console from the SDK;
TypeError: Cannot read properties of undefined (reading 'getToken')
at KindeProvider.tsx:176:1
Is appears that client
is undefined when we call the getToken function. To get around this we are using getToken within a useEffect hook essentially until we get a returned value. This issue is compounded by #45 as the promise is rejected with an undefined error due to being console logged in the sdk directly.
Additionally, we have noticed that the getToken function is declared in kinde-auth-pkce-js/index as having 0 arguments however one argument is being passed in at KindeProvider.tsx:176. It doesn't look like this causes the above issue, but it was a warning from our IDE
Library URL
https://github.com/kinde-oss/kinde-auth-react
Library version
4.0.1
Operating system(s)
macOS
Operating system version(s)
Sonoma 14.0
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response
Activity