# React demo app not working

**URL:** <https://community.auth0.com/t/react-demo-app-not-working/100619>\
**Category:** Get Help\
**Tags:** application, sso\
**Created:** [February 16, 2023, 1:26am UTC](https://community.auth0.com/t/react-demo-app-not-working/100619 "2023-02-16T01:26:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![perathkarthik](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/perathkarthik/32/44683_2.png) [@perathkarthik](https://community.auth0.com/u/perathkarthik)\
**Post date:** [February 16, 2023, 1:26am UTC](https://community.auth0.com/t/react-demo-app-not-working/100619/1 "2023-02-16T01:26:38Z")

</div>

I followed this [doc](https://auth0.com/docs/quickstart/spa/react?_ga=2.4792177.399100028.1676489484-1131854415.1674053938&_gac=1.221553514.1675875390.CjwKCAiArY2fBhB9EiwAWqHK6oqQuw_DXofat5GFttYblmy7n7fpXHV2Kqs8cL4C5NnJH5OrcIEptRoCFv4QAvD_BwE&_gl=1*130a0gr*rollup_ga*MTEzMTg1NDQxNS4xNjc0MDUzOTM4*rollup_ga_F1G3E656YZ*MTY3NjUwOTI3OC4yNy4xLjE2NzY1MTA0NDUuNjAuMC4w) to test login to react app.

When i login with test user, i get “Oops… unauthorized”

redirect\_uri under authorizationParams is set to window.location.origin. May be this is causing the issue. What should be the value for this param?

Steps to reproduce:

1. create an auth0 account
2. download the React quickstart guide
3. fill the ‘domain’ field and ‘clientId’ field with client ID of the Default App in index.js
4. add ‘[http://localhost:3000](http://localhost:3000/)’ to Allowed Callback URLs, Allowed Web Origins, and Allowed Logout URLs
5. run `npm install` and `npm start` in the root directory of the quickstart
6. click the login button
7. attempt to login using test user
8. receive error: “Oops… unauthorized”

---

<div class="post-metadata">

**Author:** ![wayne.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/wayne.lim/32/44587_2.png) [@wayne.lim](https://community.auth0.com/u/wayne.lim)\
**Post date:** [February 16, 2023, 7:59am UTC](https://community.auth0.com/t/react-demo-app-not-working/100619/2 "2023-02-16T07:59:36Z")

</div>

Hello @perathkarthik ,

Welcome to the Community!

Would you be able to either:

1. Create a new application, ensure it is a Single Page Application type and that the Token Endpoint Authentication Mode setting is “None”

2. Modify your existing Default App so that Token Endpoint Authentication Mode is set to “None”. For SPAs, this option is normally disabled, so you may need to change to a different application type, change this setting and then set it back to SPA again.

You can refer [here](https://github.com/auth0-samples/auth0-react-samples/issues/206) about the fix discussed on GitHub.

This issue is also very similar to the one posted in the Community and sharing for your reference as well.

> [@React Quickstart demo not working](https://community.auth0.com/t/react-quickstart-demo-not-working/59214/3):
>
> Hi @cartercwchen1, Welcome to the Community! I don’t believe the default app has an application type selected yet. It must be Single Page Application in the application settings under Application Properties: Please let me know if that resolves the issue. Thanks!

The redirect\_uri should not be the cause of error in this case.

Thanks!

---

<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 2, 2023, 8:00am UTC](https://community.auth0.com/t/react-demo-app-not-working/100619/3 "2023-03-02T08:00:28Z")

</div>

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