Auth0 callback fail error on sample with NextJS

Hi,

I created a new “Regular Web Application” with NextJS as my framework. I applied the callback url as well as the Allowed Logout URLs and installed the necessary packages as well. However i’m having this weird error message pasted below:

LoginHandlerError: Login handler failed. CAUSE: Discovery requests failing for https://dev-t44xspsfjz2mwxzc.us.auth0.com, unable to get local issuer certificate
[0]     at LoginHandlerError.AuthError [as constructor] (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:34:16)
[0]     at LoginHandlerError.HandlerError [as constructor] (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:111:24)
[0]     at new LoginHandlerError (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:162:28)
[0]     at Object.<anonymous> (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/handlers/login.js:36:31)
[0]     at step (/Users/yannbohbot/Downloads/sample-01 2/node_modules/tslib/tslib.js:144:27)
[0]     ... 2 lines matching cause stack trace ...
[0]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[0]   code: 'ERR_LOGIN_HANDLER_FAILURE',
[0]   cause: DiscoveryError: Discovery requests failing for https://dev-t44xspsfjz2mwxzc.us.auth0.com, unable to get local issuer certificate
[0]       at DiscoveryError.EscapedError [as constructor] (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/auth0-session/utils/errors.js:14:16)
[0]       at new DiscoveryError (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/auth0-session/utils/errors.js:86:16)
[0]       at Object.<anonymous> (/Users/yannbohbot/Downloads/sample-01 2/node_modules/@auth0/nextjs-auth0/dist/auth0-session/client.js:48:27)
[0]       at step (/Users/yannbohbot/Downloads/sample-01 2/node_modules/tslib/tslib.js:144:27)
[0]       at Object.throw (/Users/yannbohbot/Downloads/sample-01 2/node_modules/tslib/tslib.js:125:57)
[0]       at rejected (/Users/yannbohbot/Downloads/sample-01 2/node_modules/tslib/tslib.js:116:69)
[0]       at process.processTicksAndRejections (node:internal/process/task_queues:95:5),
[0]   status: undefined
[0] }

Can anyone help me understand what’s going on?

1 Like

Hey there!

Can you reference here the sample that you are utilising? Thank you!

Hi,
I’m having basically the same issue. I have a NextJS app with “Regular Web App” authorization. I set everything up locally and it has been working fine for about a week. I have a version deployed on Vercel and that works fine. Now today, my local environment fails when calling the api/auth/login route. The deployed version still works fine.

LoginHandlerError: Login handler failed. CAUSE: Discovery requests failing for https://dev-0qj5tx1py4vgutlt.us.auth0.com, outgoing request timed out after 5000ms
    at LoginHandlerError.AuthError [as constructor] (C:\path\to\node_modules\@auth0\nextjs-auth0\dist\utils\errors.js:34:16)
    at LoginHandlerError.HandlerError [as constructor] (C:\path\to\node_modules\@auth0\nextjs-auth0\dist\utils\errors.js:110:23)
    at new LoginHandlerError (C:\path\to\@auth0\nextjs-auth0\dist\utils\errors.js:160:28)
    at C:\path\to\node_modules\@auth0\nextjs-auth0\dist\handlers\login.js:36:31
    at step (C:\path\to\node_modules\tslib\tslib.js:193:27)
    at Object.throw (C:\path\to\node_modules\tslib\tslib.js:174:57)
    at rejected (C:\path\to\node_modules\tslib\tslib.js:165:69) {
  code: 'ERR_LOGIN_HANDLER_FAILURE',
  cause: DiscoveryError: Discovery requests failing for https://dev-0qj5tx1py4vgutlt.us.auth0.com, outgoing request timed out after 5000ms
      at DiscoveryError.EscapedError [as constructor] (C:\path\to\node_modules\@auth0\nextjs-auth0\dist\auth0-session\utils\errors.js:14:16)
      at new DiscoveryError (C:\path\to\node_modules\@auth0\nextjs-auth0\dist\auth0-session\utils\errors.js:86:16)
      at C:\path\to\node_modules\@auth0\nextjs-auth0\dist\auth0-session\client.js:50:27
      at step (C:\path\to\node_modules\tslib\tslib.js:193:27)
      at Object.throw (C:\path\to\node_modules\tslib\tslib.js:174:57)
      at rejected (C:\path\to\node_modules\tslib\tslib.js:165:69),
  status: undefined
1 Like

@konrad.sopala
what do you mean by sample?
I’m using NextJS with Regular Web app and even more i downloaded the Sample projects to get me going

Yep that’s exactly what I mean can you share the link to the sample project you downloaded? So we can talk about it and tackle it directly with the sample maintainers. Thank you!

1 Like