Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!