Skip to content

Logout not clearing session cookie when base path is set #2222

@mustafahasan

Description

@mustafahasan

Checklist

Description

When a base path is set for the application, the default logout route is not clearing the correct session cookie. Looking at the console logs, it appears to be clearing the session cookie set at a root level (/) but not the session cookie that is set at the base path level.

Reproduction

  1. Follow the ReadMe to set a base path for your application.
  2. Login to the application and you’ll notice that the cookie is set at the correct base path specified.
  3. Logout of the application and you’ll notice that the session cookies are still there (the wrong ones were cleared)

Additional context

No response

nextjs-auth0 version

4.8.0

Next.js version

15.3.1

Node.js version

24.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions