Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

217
Vistas
If I redirect my app to a Next JS page, can we extract the headers in the Next JS page?

I was working on the intuit-oauth and realised that I can't do axios.get to my 'api/auth/qb' which redirects me to the authorization page whose link gets generated in the backend. It throws a CORS error and the intuit-team has said in a forum that they don't support client side oauth(https://help.developer.intuit.com/s/question/0D50f00005pP1e5/cors-error-while-getting-access-token-using-url-httpsoauthplatformintuitcomoauth2v1tokensbearer) and hence the error.

the error:

Access to XMLHttpRequest at 'https://appcenter.intuit.com/connect/oauth2?client_id=<MY_CLIENT_ID>&redirect_uri=<MY_REDIRECT_URI>&response_type=code&scope=com.intuit.quickbooks.accounting%20openid&state=<MY_STATUS>' (redirected from 'http://localhost:3000/api/auth/qb') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

the next js pages structure:

pages
--index.tsx
--dashboard.tsx
--api
   |--auth
       |--qb.tsx

So, I planned to redirect the user to '/dashboard' from the backend once I get the access token and send the access token in the header, and then if i can extract the code in the nextJS page, I would store it in the local storage, so the question is: can I extract it on the next js page and if yes, how?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda