# Code samples available for utilizing auth0-spa-js?

**URL:** <https://community.auth0.com/t/code-samples-available-for-utilizing-auth0-spa-js/78046>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [February 10, 2022, 2:45pm UTC](https://community.auth0.com/t/code-samples-available-for-utilizing-auth0-spa-js/78046 "2022-02-10T14:45:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robliou01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/robliou01/32/34126_2.png) [@robliou01](https://community.auth0.com/u/robliou01)\
**Post date:** [February 10, 2022, 2:45pm UTC](https://community.auth0.com/t/code-samples-available-for-utilizing-auth0-spa-js/78046/1 "2022-02-10T14:45:25Z")

</div>

Hi,

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

> **[Auth0 Single Page App SDK](https://auth0.com/docs/libraries/auth0-single-page-app-sdk#create-the-client)**
>
> Auth0 SDK for single page applications using Authorization Code Grant Flow with PKCE.

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](https://auth0.github.io/auth0-spa-js/) (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.

Thanks,

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 23, 2022, 7:09pm UTC](https://community.auth0.com/t/code-samples-available-for-utilizing-auth0-spa-js/78046/3 "2022-02-23T19:09:18Z")

</div>

Hi @robliou01,

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

> **[Auth0 React SDK Quickstarts: Login](https://auth0.com/docs/quickstart/spa/react/01-login)**
>
> Auth0 allows you to add authentication to your React application quickly and to gain access to user profile information. This guide demonstrates how to integrate Auth0 with any new or existing React application using the Auth0 React SDK.

Additionally, you might want to check out our [Auth0 Developer Resources](https://auth0.com/developers/hub).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 10, 2022, 7:10pm UTC](https://community.auth0.com/t/code-samples-available-for-utilizing-auth0-spa-js/78046/4 "2022-03-10T19:10:02Z")

</div>

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