Auth0 Edge runtime for Cloudflare pages compatibility

Hi There,
I am using A cloudflare page to host my website and use Auth0 for my authentication.
When running locally, my build completes. However, when i deploy to cloudflare, i get this error:

The following routes were not configured to run with the Edge Runtime:
16:39:16.475    ⚡️       - /api/auth/[...auth0]
16:39:16.475    ⚡️       - /api/auth/session
16:39:16.475    ⚡️       - /api/auth/token
16:39:16.475    ⚡️       - /api/delete-file
16:39:16.475    ⚡️       - /api/retrieve-file
16:39:16.476    ⚡️       - /api/upload-url
16:39:16.476    ⚡️       - /invite/[token]
16:39:16.476    ⚡️       - /workspaces/[id]/billing/cancel
16:39:16.476    ⚡️       - /workspaces/[id]/billing/success
16:39:16.476    ⚡️       - /workspaces/[id]/billing
16:39:16.476    ⚡️ 
16:39:16.476    ⚡️     Please make sure that all your non-static routes export the following edge runtime route segment config:
16:39:16.476    ⚡️       export const runtime = 'edge';
16:39:16.476    ⚡️ 
16:39:16.477    ⚡️     You can read more about the Edge Runtime on the Next.js documentation:
16:39:16.477    ⚡️       https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes


I have done this but the problem is that auth0 does not work with the edge runtime (as far as I can see, I'm getting erorr from the auth0 SDK if I try to do this).

Does anyone have an idea on how I can get around this?
Was this page helpful?