# How to debug proxy

**URL:** <https://community.auth0.com/t/how-to-debug-proxy/196895>\
**Category:** Get Help\
**Tags:** identifier-first, login-experience\
**Created:** [February 4, 2026, 5:16am UTC](https://community.auth0.com/t/how-to-debug-proxy/196895 "2026-02-04T05:16:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim\_king\_2000](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jim_king_2000/32/61728_2.png) [@jim\_king\_2000](https://community.auth0.com/u/jim_king_2000)\
**Post date:** [February 4, 2026, 5:16am UTC](https://community.auth0.com/t/how-to-debug-proxy/196895/1 "2026-02-04T05:16:03Z")

</div>

I use auth0 with next.js. It works well in my local computer. But in my cloud env, it throws error.

```auto
// proxy.ts

import { auth0 } from 'auth'

export async function proxy(request: Request) {
  console.log('Middleware request url:', request.url)
  return auth0.middleware(request)
}

export const config = {
  matcher: [
    /*
     * Match all request paths except for the ones starting with:
     * - _next/static (static files)
     * - _next/image (image optimization files)
     * - favicon.ico, sitemap.xml, robots.txt (metadata files)
     */
    '/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
  ],
}

```

The error message:

```auto
Middleware request url: https://localhost:3000/auth/login/
An error occurred while performing the discovery request. issuer=https://jimjinauth0.auth0.com/, error: Error [TimeoutError]: The operation was aborted due to timeout
    at async oU.discoverAuthorizationServerMetadata (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:23:152902)
    at async oU.authorizationUrl (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:23:155113)
    at async oU.startInteractiveLogin (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:23:141853)
    at async handler (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:26:1282)
    at async (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:23:35999)
    at async tj (.next/server/chunks/[root-of-the-server]__1d0e1319._.js:23:32359) {
  code: 23,
  INDEX_SIZE_ERR: 1,
  DOMSTRING_SIZE_ERR: 2,
  HIERARCHY_REQUEST_ERR: 3,
  WRONG_DOCUMENT_ERR: 4,
  INVALID_CHARACTER_ERR: 5,
  NO_DATA_ALLOWED_ERR: 6,
  NO_MODIFICATION_ALLOWED_ERR: 7,
  NOT_FOUND_ERR: 8,
  NOT_SUPPORTED_ERR: 9,
  INUSE_ATTRIBUTE_ERR: 10,
  INVALID_STATE_ERR: 11,
  SYNTAX_ERR: 12,
  INVALID_MODIFICATION_ERR: 13,
  NAMESPACE_ERR: 14,
  INVALID_ACCESS_ERR: 15,
  VALIDATION_ERR: 16,
  TYPE_MISMATCH_ERR: 17,
  SECURITY_ERR: 18,
  NETWORK_ERR: 19,
  ABORT_ERR: 20,
  URL_MISMATCH_ERR: 21,
  QUOTA_EXCEEDED_ERR: 22,
  TIMEOUT_ERR: 23,
  INVALID_NODE_TYPE_ERR: 24,
  DATA_CLONE_ERR: 25
}

```

How could I debug it?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 5, 2026, 7:37pm UTC](https://community.auth0.com/t/how-to-debug-proxy/196895/4 "2026-02-05T19:37:11Z")

</div>

Hi @jim_king_2000

Welcome to the Auth0 Community!

From what I can see, it appears that your cloud environment cannot reach the OIDC discovery endpoint of your Auth0 tenant and it can be caused by the environment itself since it is behind a firewall, gateway or other traffic rules blocking the connection.

I would recommend getting Shell Access to your environment via ssh, docket exec ir any other method offered by the cloud provider and then test the connectivity by running:

```auto
curl -v https://{{AUT0_DOMAIN}}.auth0.com/.well-known/openid-configuration

```

OR

```auto
ping {{AUT0_DOMAIN}}.auth0.com
traceroute {{AUT0_DOMAIN}}.auth0.com

```

If you do not receive any responses because of a timeout, I would recommend checking your environment’s network configuration.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 19, 2026, 7:37pm UTC](https://community.auth0.com/t/how-to-debug-proxy/196895/5 "2026-02-19T19:37:40Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
