Hello there, I’m in big trouble to find a way to put Auth0 in my app,
I feel like I have made everything to make it work but it’s still not.
My error is TypeError: auth0Client is undefined and this happens when my login button tries to call loginWithRedirect function from the Auth0Provider. I can assume that the provider isn’t well implemented in the code. I tried many ways with the Auth0 React SDK Quickstart to make it work, but since I am in typescript, this makes it a little harder.
Here is a sample of my code where the Auth0Provider is implemented.
I’ve suceed to make it work once, but right after that, it is still doing a similar error which is : Uncaught (in promise) TypeError: auth0_spa_js_1.default is not a function.
It says the error is when createAuth0Client() is called.
I made some research all over google and in every possible solution, they all converge some tsconfig options which seem to not work for me.
Here are some traces of the errors which you may want to take a look.
The line 44 where the error is thrown, which is the createAuth0Client(initOptions) call.