# \#auth0-react

**URL:** https://community.auth0.com/tag/auth0-react/1559.md

[Latest](https://community.auth0.com/latest.md) · [Categories](https://community.auth0.com/categories.md) · [Tags](https://community.auth0.com/tags.md)

---

## [How to get accesss token in react-native](https://community.auth0.com/t/how-to-get-accesss-token-in-react-native/196032)

<div class="topic-metadata">

**Author:** [@auth040](https://community.auth0.com/u/auth040)\
**Replies:** 1\
**Last updated:** [January 8, 2026, 4:04pm UTC](https://community.auth0.com/t/how-to-get-accesss-token-in-react-native/196032 "2026-01-08T16:04:59Z")

</div>

I am going mad and would like to get some help from someone. I have even now tried with the sample app but am guetting the same result. In a nutshell: When calling authorize in my react-native app, I never get a token …

---

## [React SPA B2B onboarding flow using two different Auth0 Applications](https://community.auth0.com/t/react-spa-b2b-onboarding-flow-using-two-different-auth0-applications/189729)

<div class="topic-metadata">

**Author:** [@pburr](https://community.auth0.com/u/pburr)\
**Replies:** 1\
**Last updated:** [July 28, 2025, 12:02pm UTC](https://community.auth0.com/t/react-spa-b2b-onboarding-flow-using-two-different-auth0-applications/189729 "2025-07-28T12:02:56Z")

</div>

Hey everyone! I’m building a B2B app using Auth0’s React SDK with AWS Lambda (no express) and JWT auth. My login and sign up flows are split into two Auth0 Applications: Login (Application) Client The default client u…

---

## [Enable Self-Service Signup in B2B SaaS](https://community.auth0.com/t/enable-self-service-signup-in-b2b-saas/189386)

<div class="topic-metadata">

**Author:** [@pburr](https://community.auth0.com/u/pburr)\
**Replies:** 5\
**Last updated:** [July 24, 2025, 2:34am UTC](https://community.auth0.com/t/enable-self-service-signup-in-b2b-saas/189386 "2025-07-24T02:34:43Z")

</div>

Hi, I’m looking to enable self-service signup within my multi-tenant application using Auth organizations and Universal Login, but I’m having trouble integrating this with the React SDK. From what I’ve gathered, the bes…

---

## [How to get the refresh\_token with getAcessTokenSilently method from the Auth0 React SDK](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514)

<div class="topic-metadata">

**Author:** [@cinnabams3782](https://community.auth0.com/u/cinnabams3782)\
**Replies:** 1\
**Last updated:** [March 27, 2025, 8:34pm UTC](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514 "2025-03-27T20:34:54Z")

</div>

Ready to post? :mag: First, try searching for your answer. I need to access to the refresh\_token so I tried calling the getAccessTokenSilently method like this: getAccessTokenSilently({ authorizationParams: {…

---

## [How to switch organization using getAccessTokenSilently](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426)

<div class="topic-metadata">

**Author:** [@renan.padilha](https://community.auth0.com/u/renan.padilha)\
**Replies:** 3\
**Last updated:** [March 26, 2025, 1:01pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426 "2025-03-26T13:01:57Z")

</div>

Hello! We have a front-end usign React 19 and Auth0’s React SDK I have an use case that we need switch organization clicking in a button that list organizations from an user (API Management). Actually the last answer …

---

## [Issue Integrating @auth0/nextjs-auth0 in Next.js Application](https://community.auth0.com/t/issue-integrating-auth0-nextjs-auth0-in-next-js-application/183546)

<div class="topic-metadata">

**Author:** [@rado](https://community.auth0.com/u/rado)\
**Replies:** 1\
**Last updated:** [March 9, 2025, 4:08am UTC](https://community.auth0.com/t/issue-integrating-auth0-nextjs-auth0-in-next-js-application/183546 "2025-03-09T04:08:34Z")

</div>

I am experiencing difficulties integrating the @auth0/nextjs-auth0 package into my Next.js application. After installing the package using: npm install @auth0/nextjs-auth0 and adding the necessary file in the /lib dire…

---

## [How to get user roles in non-react functions on client in spa?](https://community.auth0.com/t/how-to-get-user-roles-in-non-react-functions-on-client-in-spa/182173)

<div class="topic-metadata">

**Author:** [@skorphil](https://community.auth0.com/u/skorphil)\
**Replies:** 1\
**Last updated:** [February 14, 2025, 8:34pm UTC](https://community.auth0.com/t/how-to-get-user-roles-in-non-react-functions-on-client-in-spa/182173 "2025-02-14T20:34:01Z")

</div>

Task: I need to retrieve roles of the users in non-react functions on the client (SPA) Context: For react components i use: import { useAuth0 } from "@auth0/auth0-react"; const { user } = useAuth0(); const roles …

---

## [SDK in both frontend and Backend?](https://community.auth0.com/t/sdk-in-both-frontend-and-backend/181371)

<div class="topic-metadata">

**Author:** [@rayen.besbes](https://community.auth0.com/u/rayen.besbes)\
**Replies:** 5\
**Last updated:** [February 5, 2025, 10:45pm UTC](https://community.auth0.com/t/sdk-in-both-frontend-and-backend/181371 "2025-02-05T22:45:39Z")

</div>

I’m currently implementing an app that uses React as a front end and .NET as a backend, I currently want to use Auth0 SDK both in our front web-app and our .NET backend to fully make use of the SDKs for CRUD and other op…

---

## [Not seeing app\_metadata in user object](https://community.auth0.com/t/not-seeing-app-metadata-in-user-object/170124)

<div class="topic-metadata">

**Author:** [@johan.lindell](https://community.auth0.com/u/johan.lindell)\
**Replies:** 14\
**Last updated:** [January 28, 2025, 5:32pm UTC](https://community.auth0.com/t/not-seeing-app-metadata-in-user-object/170124 "2025-01-28T17:32:29Z")

</div>

\<Auth0Provider domain={"dev-5om225fvn1mnxkrw.us.auth0.com"} clientId={"kdQnDELfUHjAqka75bCVMQfHThzMsWd1"} cacheLocation={"localstorage"} authorizationParams={{ redirect\_uri: wind…

---

## [How to logout outside of components in react SPA](https://community.auth0.com/t/how-to-logout-outside-of-components-in-react-spa/170128)

<div class="topic-metadata">

**Author:** [@johan.lindell](https://community.auth0.com/u/johan.lindell)\
**Replies:** 1\
**Last updated:** [January 24, 2025, 10:12pm UTC](https://community.auth0.com/t/how-to-logout-outside-of-components-in-react-spa/170128 "2025-01-24T22:12:41Z")

</div>

When our server returns a 401 I’d like to clear all user information and log out of the current session. How can I call logout from an axios interceptor, not from inside a component in React.

---

## [Error handling with auth0-react](https://community.auth0.com/t/error-handling-with-auth0-react/150167)

<div class="topic-metadata">

**Author:** [@steven.m.wexler](https://community.auth0.com/u/steven.m.wexler)\
**Replies:** 1\
**Last updated:** [January 23, 2025, 7:44pm UTC](https://community.auth0.com/t/error-handling-with-auth0-react/150167 "2025-01-23T19:44:17Z")

</div>

I have Auth0 working effectively in my React app. Now, I am trying to track down edge cases to recover/respond when users hit errors. I see that useAuth0 returns an error. But I don’t see a list of the potential errors i…

---

## [Auth0 React SDK getAccessTokenSilently third party cookie issue](https://community.auth0.com/t/auth0-react-sdk-getaccesstokensilently-third-party-cookie-issue/157031)

<div class="topic-metadata">

**Author:** [@vasco\_santana](https://community.auth0.com/u/vasco_santana)\
**Replies:** 1\
**Last updated:** [December 9, 2024, 6:32pm UTC](https://community.auth0.com/t/auth0-react-sdk-getaccesstokensilently-third-party-cookie-issue/157031 "2024-12-09T18:32:57Z")

</div>

Hi, Im trying to implement authentication using auth0 which is being served under a different domain. Using getAccessTokenSilently is critical as the user may already have a session that could have been initiated from …

---

## [Auth0-react in incognito mode running infinite redirect loop](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918)

<div class="topic-metadata">

**Author:** [@shahar.s](https://community.auth0.com/u/shahar.s)\
**Replies:** 2\
**Last updated:** [December 4, 2024, 7:22pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918 "2024-12-04T19:22:32Z")

</div>

Hey, I’m using auth0-react in my website and I’m running into an infinite redirect loop when trying to access it from incognito or Safari. After investigation, I understand that it is due to blocking 3rd party cookies. …

---

## [Await getAccessToken() fails with "TypeError: Failed to parse URL from /auth/access-token"](https://community.auth0.com/t/await-getaccesstoken-fails-with-typeerror-failed-to-parse-url-from-auth-access-token/152109)

<div class="topic-metadata">

**Author:** [@jspencer](https://community.auth0.com/u/jspencer)\
**Replies:** 2\
**Last updated:** [November 21, 2024, 8:29pm UTC](https://community.auth0.com/t/await-getaccesstoken-fails-with-typeerror-failed-to-parse-url-from-auth-access-token/152109 "2024-11-21T20:29:17Z")

</div>

Ready to post? :mag: First, try searching for your answer. Hi, I’m using “@auth0/nextjs-auth0”: “^4.0.0-beta.7” to sign in and get an access token. The sign in is completing however, when I try to use the following fr…

---

## [Getting Opaque token instead of JWT token (Audience Added)](https://community.auth0.com/t/getting-opaque-token-instead-of-jwt-token-audience-added/129715)

<div class="topic-metadata">

**Author:** [@fabri-g](https://community.auth0.com/u/fabri-g)\
**Replies:** 1\
**Last updated:** [March 14, 2024, 6:33pm UTC](https://community.auth0.com/t/getting-opaque-token-instead-of-jwt-token-audience-added/129715 "2024-03-14T18:33:10Z")

</div>

Hi! I’m developing a React application using Auth0 for authentication. I’m using the getAccessTokenSilently method to get an access token to use in my backend. This is my Auth0Provider component: \<Auth0Provider d…

---

## [React I get an Opaque JWT when I call getAccessTokenSilently, even after defining the audience and scope in the Provider](https://community.auth0.com/t/react-i-get-an-opaque-jwt-when-i-call-getaccesstokensilently-even-after-defining-the-audience-and-scope-in-the-provider/127358)

<div class="topic-metadata">

**Author:** [@authMemberuser](https://community.auth0.com/u/authMemberuser)\
**Replies:** 4\
**Last updated:** [March 12, 2024, 4:22pm UTC](https://community.auth0.com/t/react-i-get-an-opaque-jwt-when-i-call-getaccesstokensilently-even-after-defining-the-audience-and-scope-in-the-provider/127358 "2024-03-12T16:22:28Z")

</div>

Hi, I’m currently developing a React application using Auth0 for authentication. I have set up the Auth0Provider with the correct audience and I’m using the getAccessTokenSilently method to retrieve the access token. H…

---

## [Authenticate to Auth0 (via Google) in Cypress](https://community.auth0.com/t/authenticate-to-auth0-via-google-in-cypress/126329)

<div class="topic-metadata">

**Author:** [@luke.skywalker](https://community.auth0.com/u/luke.skywalker)\
**Replies:** 3\
**Last updated:** [February 19, 2024, 7:56pm UTC](https://community.auth0.com/t/authenticate-to-auth0-via-google-in-cypress/126329 "2024-02-19T19:56:25Z")

</div>

Hello, I have an existing single page react app that I’ve recently added login for via Auth0; and added authentication to API requests from this app by passing the Authorization: Bearer \<token\> in HTTP requests. So far,…

---

## [How to create a proper custom axios instance for Orval?](https://community.auth0.com/t/how-to-create-a-proper-custom-axios-instance-for-orval/123196)

<div class="topic-metadata">

**Author:** [@matamatanot](https://community.auth0.com/u/matamatanot)\
**Replies:** 1\
**Last updated:** [December 22, 2023, 4:02pm UTC](https://community.auth0.com/t/how-to-create-a-proper-custom-axios-instance-for-orval/123196 "2023-12-22T16:02:01Z")

</div>

We are considering using Orval. We are currently using React and @auth0/auth0-react. const useAuthBearerToken = () =\> { const { getAccessTokenSilently } = useAuth0(); const getBearerToken = async () =\> { cons…

---

## [Refetch access token after callback](https://community.auth0.com/t/refetch-access-token-after-callback/120327)

<div class="topic-metadata">

**Author:** [@DawnMD](https://community.auth0.com/u/DawnMD)\
**Replies:** 5\
**Last updated:** [November 13, 2023, 6:20pm UTC](https://community.auth0.com/t/refetch-access-token-after-callback/120327 "2023-11-13T18:20:29Z")

</div>

I’m using auth-0/react SDK for the Gatsby app, as I need dynamic callback URLs I created a callback page stored the redirect URL in local storage, and forwarded the key to auth0 for authorization as mentioned here (PS: I…

---

## [Allow a specific user to access their data in django backend](https://community.auth0.com/t/allow-a-specific-user-to-access-their-data-in-django-backend/117374)

<div class="topic-metadata">

**Author:** [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Replies:** 3\
**Last updated:** [September 29, 2023, 6:27pm UTC](https://community.auth0.com/t/allow-a-specific-user-to-access-their-data-in-django-backend/117374 "2023-09-29T18:27:08Z")

</div>

I dont suppose you know how i am suppose to sync the users between the react front end and my django back end so a specific user can access their data in the back end etc

---

## [Passing custom parameters to Auth0 Actions from New Universal Login](https://community.auth0.com/t/passing-custom-parameters-to-auth0-actions-from-new-universal-login/117148)

<div class="topic-metadata">

**Author:** [@oliver.sipos](https://community.auth0.com/u/oliver.sipos)\
**Replies:** 1\
**Last updated:** [September 27, 2023, 7:10pm UTC](https://community.auth0.com/t/passing-custom-parameters-to-auth0-actions-from-new-universal-login/117148 "2023-09-27T19:10:56Z")

</div>

Feature: I would like to be able to pass custom parameter to the New Universal Login from SPA/mobile app, and I want to be able to read it in Actions. Description: As far as I know, this is possible in Rules, but since …

---

## [Auth0-React State](https://community.auth0.com/t/auth0-react-state/115943)

<div class="topic-metadata">

**Author:** [@KimberlyRamirez](https://community.auth0.com/u/KimberlyRamirez)\
**Replies:** 1\
**Last updated:** [September 11, 2023, 10:33pm UTC](https://community.auth0.com/t/auth0-react-state/115943 "2023-09-11T22:33:03Z")

</div>

I am using Cypress for E2E testing and Auth0-React. Currently I am programmatically logging into the app I need to test in my Cypress project. I use a PKCE flow to get a auth0 token to login, and then store that token in…

---

## [Error "Service not found" when trying to authenticate user using auth0 in React app with Express.js backend](https://community.auth0.com/t/error-service-not-found-when-trying-to-authenticate-user-using-auth0-in-react-app-with-express-js-backend/113351)

<div class="topic-metadata">

**Author:** [@santhoshprabhakaran0](https://community.auth0.com/u/santhoshprabhakaran0)\
**Replies:** 1\
**Last updated:** [August 14, 2023, 3:42pm UTC](https://community.auth0.com/t/error-service-not-found-when-trying-to-authenticate-user-using-auth0-in-react-app-with-express-js-backend/113351 "2023-08-14T15:42:35Z")

</div>

0 I’m currently working on a React application with an Express.js backend where I’m trying to authenticate users using the Auth0 package. I have a setup where the frontend and backend communicate through API requests. I…

---

## [Auth0 react - login + backend API protection](https://community.auth0.com/t/auth0-react-login-backend-api-protection/112532)

<div class="topic-metadata">

**Author:** [@rashmi](https://community.auth0.com/u/rashmi)\
**Replies:** 1\
**Last updated:** [August 2, 2023, 8:30pm UTC](https://community.auth0.com/t/auth0-react-login-backend-api-protection/112532 "2023-08-02T20:30:10Z")

</div>

Hi, I am using auth0 login for react app. I also have my backend on express, which I have protected using steps mentioned here - Auth0 Node (Express) API SDK Quickstarts: Authorization. I am confused and unable to call t…

---

## [Complete Auth0 example for react router v6?](https://community.auth0.com/t/complete-auth0-example-for-react-router-v6/112173)

<div class="topic-metadata">

**Author:** [@neilenns](https://community.auth0.com/u/neilenns)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 1:18pm UTC](https://community.auth0.com/t/complete-auth0-example-for-react-router-v6/112173 "2023-08-01T13:18:39Z")

</div>

Does anyone have a complete, working, exampe of using Auth0 with react router v6? Specifically: How to create an Auth0 component that can make use of the react router v6 navigation model How to wrap routes created with…

---

## [Error: Consent required. localhost. Code examples to grant user consent during development](https://community.auth0.com/t/error-consent-required-localhost-code-examples-to-grant-user-consent-during-development/111314)

<div class="topic-metadata">

**Author:** [@globalmax](https://community.auth0.com/u/globalmax)\
**Replies:** 1\
**Last updated:** [July 17, 2023, 2:31pm UTC](https://community.auth0.com/t/error-consent-required-localhost-code-examples-to-grant-user-consent-during-development/111314 "2023-07-17T14:31:23Z")

</div>

Hi all, I understand that consent is required when serving in development, but I can’t find any clear code examples in the docs or community for granting the consent when this error occurs on localhost in development. I…

---

## [Added Audience and STILL getting Opaque token instead of JWT token with React](https://community.auth0.com/t/added-audience-and-still-getting-opaque-token-instead-of-jwt-token-with-react/110636)

<div class="topic-metadata">

**Author:** [@nicktb](https://community.auth0.com/u/nicktb)\
**Replies:** 5\
**Last updated:** [July 5, 2023, 11:54pm UTC](https://community.auth0.com/t/added-audience-and-still-getting-opaque-token-instead-of-jwt-token-with-react/110636 "2023-07-05T23:54:14Z")

</div>

Hello, I’m currently developing a React application using Auth0 for authentication. I have set up the Auth0Provider with the correct audience and I’m using the getAccessTokenSilently method to retrieve the access token. …

---

## [Auth0-react failing silently on succesful login](https://community.auth0.com/t/auth0-react-failing-silently-on-succesful-login/109142)

<div class="topic-metadata">

**Author:** [@sammbeller](https://community.auth0.com/u/sammbeller)\
**Replies:** 11\
**Last updated:** [July 4, 2023, 11:49am UTC](https://community.auth0.com/t/auth0-react-failing-silently-on-succesful-login/109142 "2023-07-04T11:49:40Z")

</div>

Hi all, I’ve set up auth0-react in our application following instructions from a number of tutorials. Clicking the login button succeeds - I can see Success Login events in my user’s history. But the Auth0Provider’s redu…

---

## [Can't use management API endpoints with login Access Token](https://community.auth0.com/t/cant-use-management-api-endpoints-with-login-access-token/107599)

<div class="topic-metadata">

**Author:** [@goncalo.rodrigues](https://community.auth0.com/u/goncalo.rodrigues)\
**Replies:** 4\
**Last updated:** [May 23, 2023, 10:30am UTC](https://community.auth0.com/t/cant-use-management-api-endpoints-with-login-access-token/107599 "2023-05-23T10:30:52Z")

</div>

Hi, I am currently working with react auth0 sdk and im struggling a bit. Im logging in with a user and sending the token to the backend that will create a ticket to reset password but it gives me error saying “Bad Token…

---

## [\[Trouble Deploying\] Flask & React Auth0 App](https://community.auth0.com/t/trouble-deploying-flask-react-auth0-app/105707)

<div class="topic-metadata">

**Author:** [@smandava98](https://community.auth0.com/u/smandava98)\
**Replies:** 2\
**Last updated:** [May 16, 2023, 3:15pm UTC](https://community.auth0.com/t/trouble-deploying-flask-react-auth0-app/105707 "2023-05-16T15:15:05Z")

</div>

I am following this tutorial: Hello World Full-Stack Security:React/JavaScript + Flask/Python (React with React Router 6 (JavaScript) + Flask (Python) Code Sample: Basic Access Control for Hello World Full-Stack App) I…

[Next page](https://community.auth0.com/tag/auth0-react/1559.md?match_all_tags=true&page=1&tags%5B%5D=auth0-react)
