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

101
Views
Application with nextjs auth stops working a few hours after deploy due to google auth 2.0

I have an application with nextjs where I identify the user with nextj auth so I can manage the youtube playlist, everything was working normally, until I add a new request and now when I deploy and a few hours pass, the application stops working and the error that google brings me is

"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential"

The new request I added was that for each playlist that the user had, I would make a call to each of those playlists to bring me the videos they have and save them in the redux

Before I added this new request on line 38, this error did not happen

Actions.js Action

pages\api\YoutubeApi\getYTData.js Request to bring the playlists

pages\api\YoutubeApi\getVideosFromPlaylists.js pt 1 Request to bring the videos

pages\api\YoutubeApi\getVideosFromPlaylists.js pt 2 Request to bring the videos

pages\api\YoutubeApi\getVideosFromPlaylists.js pt 3 Request to bring the videos

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!