Skip to content

[bug] Compatibility issue #2595

@jim-king-2000

Description

@jim-king-2000

Checklist

Description

When @auth0/nextjs-auth0 is upgraded to v4.17.0, it breaks.

This is @auth0/nextjs-auth0 used in the front-end.

import { Auth0Client } from '@auth0/nextjs-auth0/server'

export const auth0 = new Auth0Client({
  authorizationParameters: {
    audience: 'https://testAPI/',
    scope: 'openid profile email',
  },
})

And this is the backend.

export const GET = auth0.withApiAuthRequired(async function (
  request,
  { params },
) {
...
}

When being upgraded to v4.17.0, auth0.withApiAuthRequired returns 401 with { "error": "not_authenticated", "description": "The user does not have an active session or is not authenticated" }. It works well on v4.16.2

analysis

The cookie on the latest version of auth0 becomes:

__session_0: ...
__session_1: ...

Looking forward to the solution.

Reproduction

Just upgrade to v4.17.0.

Additional context

No response

nextjs-auth0 version

4.17.0

Next.js version

16.2.3

Node.js version

25.9.0

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions