NextAuth.js google provider has issue

Hi there, I have a problem with google provider in NextAuth.js , I configure that completely like The Ultimate Next.js Series course, but I got this error :pensive:

at async Client.callback (webpack-internal:///(rsc)/./node_modules/openid-client/lib/client.js:417:13)
      at async oAuthCallback (webpack-internal:///(rsc)/./node_modules/next-auth/core/lib/oauth/callback.js:118:22)
      at async Object.callback (webpack-internal:///(rsc)/./node_modules/next-auth/core/routes/callback.js:18:79)
      at async AuthHandler (webpack-internal:///(rsc)/./node_modules/next-auth/core/index.js:202:38)
      at async NextAuthRouteHandler (webpack-internal:///(rsc)/./node_modules/next-auth/next/index.js:50:30)
      at async NextAuth._args$ (webpack-internal:///(rsc)/./node_modules/next-auth/next/index.js:84:24)
      at async C:\Users\Mohsen\OneDrive\Desktop\nextjs-proj\node_modules\next\dist\compiled\next-server\ {
    name: 'OAuthCallbackError',
    code: undefined
  providerId: 'google',
  message: 'outgoing request timed out after 3500ms'

Thanks for Help guys :pray:

This wonโ€™t make any sense, but try changing your Wi-Fi connection. I tried and now itโ€™s working.

Most likely it is an issue with your configuration.

Double-check the settings in the google console to make sure the URLs are setup correctly and double-check the variables in the .env file.

One thing that got me was that I used in one spot and localhost in another spot. Another issue I had was using https vs http. Localhost should be http while production server should have https.