Skip to content

Error: Route "/api/auth/[auth0]" used params.auth0. params should be awaited before using its properties. #175

@akladyous

Description

@akladyous

Checklist

  • I have looked into the Readme and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

This issue arises from a breaking change introduced in Next.js 15, which transitioned certain APIs to be asynchronous. according to Next.js release notes:

the server now requires awaiting request-specific data (such as params, headers, cookies, and searchParams) before using their properties.

Reproduction

`import { handleAuth } from "@auth0/nextjs-auth0";

export const GET = handleAuth();
`

Additional context

Screenshot 2024-10-27 at 11 31 46 AM

Metadata

Metadata

Assignees

No one assigned

    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