Module '"@auth0/nextjs-auth0"' has no exported member 'handleAuth'

In my nextjs app, and inside “\src\app\api\auth[…auth0]\route.ts”
I’m importing handle auth from nextjs-auth0 sdk but it gives error of no exported member.

import { handleAuth } from ‘@auth0/nextjs-auth0’;

the sdk is installed and the version is ^4.0.2.

“dependencies”: {
@auth0/nextjs-auth0”: “^4.0.2”,

Am I doing something wrong?

My nextjs version is also latest, all the dependencies are latest ones.

any help here please?

Can anyone help please? I’m trying but there is no clear docs update that handleAuth is not supported. I even tried to create a new nextjs app just to check but same error: Module ‘“@auth0/nextjs-auth0”’ has no exported member ‘handleAuth’.

have the same issue, so sadly don’t have a solution yet. Gemini has some other recommendations, but throw same error

I deleted route.ts and it worked :person_shrugging:

instead route.ts
using lib/auth0.ts works
import { Auth0Client } from “@auth0/nextjs-auth0/server”

export const auth0 = new Auth0Client();

and a middleware.ts

but my setup is different so i won’t be using middleware.ts here