# React Sample APP login

**URL:** <https://community.auth0.com/t/react-sample-app-login/57228>\
**Category:** Get Help\
**Created:** [February 2, 2021, 7:19pm UTC](https://community.auth0.com/t/react-sample-app-login/57228 "2021-02-02T19:19:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 2, 2021, 7:19pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/1 "2021-02-02T19:19:10Z")

</div>

trying to setup the sample react app, followed the guide and setup api but when i try to login i get this page saying this:

“Check if there is a typo in %[7Btenant-name.us.auth0.com](http://7Btenant-name.us.auth0.com)%7D.  
DNS\_PROBE\_FINISHED\_NXDOMAIN”

crashing url: “https://%[7Btenant-name.us.auth0.com](http://7Btenant-name.us.auth0.com)%7D/authorize?audience=%7Bhttps%3A%2F%[2Fgithub.com](http://2Fgithub.com)%2Fnoho-glitch%2Fauth0-react-samples%7D&client\_id=%CLIENT\_ID&redirect\_uri=http%3A%2F%2Flocalhost%3A3000&scope=openid%20profile%20email&response\_type=code&response\_mode=query&state=TVI4Z240a1VmYjR0ZUY4aWpBQXpuWjlfT01TTnFvbkdUYml1WFV%2BTzFCUQ%3D%3D&nonce=OXUydmRVeXRWMnItYjVmQmxDOFdjbVI1SVJBUHNyLXdpTHlIc0F1YXpTRw%3D%3D&code\_challenge=LXXpj8yoe-3cqmUHCp7pgX56t3jf9-X3p6bvjRI6xCo&code\_challenge\_method=S256&auth0Client=CLIENT\_ID%3D%3D”

There’s nothing in the console

thanks for your help in advance

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 2, 2021, 8:39pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/3 "2021-02-02T20:39:39Z")

</div>

Hi @dpn.nolan,

Welcome to the Community!

It looks like curly brackets might be included in the domain name (`%7B` is `{` and `%7D` is `}`)

To help see what is going on, could you send a snippet of your code where the `Auth0Provider` is rendered? Be sure to remove any sensitive data such as Client IDs or domains.

```auto
ReactDOM.render(
  <Auth0Provider
    domain={config.domain}
    clientId={config.clientId}
    audience={config.audience}
    redirectUri={window.location.origin}
    onRedirectCallback={onRedirectCallback}
    cacheLocation="localstorage"
  >
    <App />
  </Auth0Provider>,
  document.getElementById("root")
);

```

What you may want to do is click the “Log In & Download Sample” option in the Quickstart docs: [Auth0 React SDK Quickstarts: Login](https://auth0.com/docs/quickstart/spa/react/01-login)

When you do this, you can select your SPA application and the configurations within the code will be in place already.

---

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 2, 2021, 9:27pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/4 "2021-02-02T21:27:18Z")

</div>

First off, thank you for your help!

I tried downloading it as you said and instead of using the a cloned github repo and am now seeing a failed get and post in the console and the page is saying invalid state when I try to login/signup with google. But I am at least correctly being redirected to the auth0 login page.

I also just found your expanded “complete” react guide and will be reading through that to get a better understanding of this works.

The auth0provider context wrapper looks to be exactly as your sample btw.

thanks again!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 3, 2021, 11:46am UTC](https://community.auth0.com/t/react-sample-app-login/57228/5 "2021-02-03T11:46:33Z")

</div>

No problem! I’m glad to hear the download helped you make some progress!

Regarding the invalid state issue, if you are still encountering it after following the React guide, could you send me a HAR file as a private message to help me troubleshoot? Thanks!

> **[Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/troubleshooting-tools/generate-and-analyze-har-files)**
>
> Learn how to troubleshoot with HAR files and steps to generate a HAR file.

---

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 3, 2021, 7:29pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/6 "2021-02-03T19:29:50Z")

</div>

Okay so I’m going through “The Complete guide to react user authentication” and I’m signing up but my button isn’t updating to “logout.” If I clear my catch I can go through the process again, or if I just click “login” again the page refreshes with this as the URL:

“[http://localhost:4040/?error=access\_denied&error\_description=Invalid%20URI%20"https%3A%2F%2F%2F%253Cyour-app-domain%253E%2Fv1alpha1%2Fgraphql"&state=Ll93SWdpZWprR0dVRzRsa2lEc0FiMjFacmVLYVRfT2dXbThPM3kxQzJ%2BUQ%3D%3D](http://localhost:4040/?error=access_denied&error_description=Invalid%20URI%20%22https%3A%2F%2F%2F%253Cyour-app-domain%253E%2Fv1alpha1%2Fgraphql%22&state=Ll93SWdpZWprR0dVRzRsa2lEc0FiMjFacmVLYVRfT2dXbThPM3kxQzJ%2BUQ%3D%3D)”

So I don’t think that I’m getting authenticated.

Other than this on first loading of the server I’m getting a CORS issue where its asking me to “indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute.”

Do I have a local storage issue? This is happening in incognito as well

 ![Screen Shot 2021-02-03 at 2.28.53 PM](https://global.discourse-cdn.com/auth0/original/3X/5/2/52f5aa28dc599c254c9d1c2416cf036799b5eae4.png)

---

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 3, 2021, 7:57pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/7 "2021-02-03T19:57:49Z")

</div>

The react dev tools is \<Auth0Provider is showing the correct props for ClientID, Domain, and the redirectUri is correct at “[https://localhost:4040](https://localhost:4040).”

I can also update isAuthenticated to true and the button updates from “Log In” to “Log Out.”

So I’m thinking there’s something setup wrong in my auth0 application settings.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 3, 2021, 8:19pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/8 "2021-02-03T20:19:34Z")

</div>

It looks like in your code you might have `<your-app-domain>` somewhere. If you replace that with your actual application domain, it should fix it. You can find your app’s domain in the application settings.

“Invalid URI “https:///%3Cyour-app-domain%3E/v1alpha1/graphql””

---

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 4, 2021, 7:55pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/9 "2021-02-04T19:55:56Z")

</div>

Searched the whole codebase for “your-app-domain” to no avail, I’ve even switched and tried the main branch and I’m getting the same result.

Edit\*\* Looks like it may be one of the rules i made for hasura. So I can’t run multiple apps because of the rules?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 4, 2021, 7:58pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/10 "2021-02-04T19:58:24Z")

</div>

Hm, just to make sure, do the configs look right in the `/src/auth_config.json` file?

---

<div class="post-metadata">

**Author:** ![dpn.nolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dpn.nolan/32/24915_2.png) [@dpn.nolan](https://community.auth0.com/u/dpn.nolan)\
**Post date:** [February 4, 2021, 8:05pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/11 "2021-02-04T20:05:10Z")

</div>

Figured it out, it was rule I had made for an app with I’m trying to integrate with Hasura! I deleted it and it works. I’ll have to rewrite it for it to work with multiple apps.

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 4, 2021, 8:05pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/12 "2021-02-04T20:05:47Z")

</div>

Awesome! Glad to hear it is working now!

---

<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:** [February 19, 2021, 8:06pm UTC](https://community.auth0.com/t/react-sample-app-login/57228/13 "2021-02-19T20:06:31Z")

</div>

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