Code samples available for utilizing auth0-spa-js?


Apologies if this is a silly question- I’m trying to integrate auth0-spa-js into my app using this tutorial:

However, I’m having a lot of issues with getting things to work. My setup is sort of complicated as it involves using Hasura Graphql, React, as well as Auth0 for authentication.

I’m wondering if there are any working code bases out there that have sort of a similar setup that I could use an example? In particular, I am having issues utilizing the Auth0Client- in particular what exactly it is (a class?) and how it’s methods can be instantiated successfully.

For example, when I try to implement the various methods it contains (Login, Calling an API, etc.), all I get returned are empty objects. My promises also tend to time out , but this is a technical area I need to work on personally.


Hi @robliou01,

We have a React-specific SDK. I would suggest starting with that. Here is an example:

Additionally, you might want to check out our Auth0 Developer Hub.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.