# @auth0/auth0-react - isAuthenticated is always false

**URL:** <https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125>\
**Category:** Get Help\
**Created:** [August 18, 2021, 11:50am UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125 "2021-08-18T11:50:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobSwann](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jacobswann/32/16961_2.png) [@jacobSwann](https://community.auth0.com/u/jacobSwann)\
**Post date:** [August 18, 2021, 11:50am UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/1 "2021-08-18T11:50:06Z")

</div>

Hello,

I am trying to implement @auth0/auth0-react into my React application, but cannot get my users authenticated for some reason. Clearing the cache and authenticating works as expected, I get sent to my tenants authentication page. Logging in is successful, redirects back to my application, but isAuthenthicated is still false. Trying to “log in” again using withAuth0’s loginWithRedirect just refreshes the page.

I followed the set up in the auth0-react-sample-classes tutorial, and have a nearly identical setup auth0-wise.

- **Which SDK this is regarding:** e.g. @auth0/auth0-react

- **SDK Version:** e.g. 1.6.0

- **Platform Version:** React 16.13.1,

- **Code Snippets/Error Messages/Supporting Details/Screenshots:**

```javascript
<Auth0Provider
        domain={domain}
        clientId={clientId}
        redirectUri={window.location.origin}
        onRedirectCallback={onRedirectCallback}
        audience={audience}
      >
        {props.children}
      </Auth0Provider>

```

Any and all suggestions are greatly appreciated!

---

<div class="post-metadata">

**Author:** ![jacobSwann](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jacobswann/32/16961_2.png) [@jacobSwann](https://community.auth0.com/u/jacobSwann)\
**Post date:** [August 23, 2021, 3:04am UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/2 "2021-08-23T03:04:27Z")

</div>

Bump. This is still a big issue.

Similar issues were reported and closed in other threads without any followup. [This thread]([isAuthenticated is false after successful login with @auth0/auth0-react](https://community.auth0.com/t/isauthenticated-is-false-after-successful-login-with-auth0-auth0-react/61959) and ) mentiones custom domains as the issue, but this is not something I have activated or used (auth is still [tenant.auth0.com](http://tenant.auth0.com)).

Again, any and all tips are greatly appreciated - this is a critical issue for me.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 23, 2021, 8:42am UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/3 "2021-08-23T08:42:32Z")

</div>

What I would suggest here to handle that most effectively would be to create the issue in the repo so we can work on that directly with the repo maintainers. Once you have the link to it please share it here so we can ping them. Thank you!

---

<div class="post-metadata">

**Author:** ![jacobSwann](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jacobswann/32/16961_2.png) [@jacobSwann](https://community.auth0.com/u/jacobSwann)\
**Post date:** [August 23, 2021, 7:30pm UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/4 "2021-08-23T19:30:08Z")

</div>

Found out what the issue was - I had foolishly used both the useAuth0 hook and the withAuth0 HOC in the same component. Removing the HOC and turning the class into a const solved my issue.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 24, 2021, 1:29pm UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/5 "2021-08-24T13:29:08Z")

</div>

Perfect! Glad to hear that and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 26, 2021, 9:13am UTC](https://community.auth0.com/t/auth0-auth0-react-isauthenticated-is-always-false/68125/6 "2021-08-26T09:13:23Z")

</div>


