Default error page not rendering (using Next.js)

Hi all,

I have an Auth0 application running in Next.js. I have an Auth0 rule set up that returns callback(new UnauthorizedError('{error message…}')) if a certain condition is met based on the user’s entered signup details.

When that rule is enforced on a user signing up, it redirects to this URL:

{baseURL}/api/auth/callback?error=unauthorized&error_description={error message…}&state={long hash string…}

What happens: The shows a 400 server response error page with no rendering.

What I expect to happen: A default Auth0 error page, per https://auth0.com/docs/authenticate/login/auth0-universal-login/error-pages#display.

Using @auth0/nextjs-auth0@2.5.0 and next@13.2.3.

The tenant error page setting is set to display “Generic” page, not “Custom”

Why am I not seeing the generic error page when my Auth0 Rule is enforced?

4 Likes

same here, I hope you got a solution?

Same issue. I’m trying to understand if it’s my responsibility to render that error message, but can’t find any docs or samples that indicate how to handle it (via some kind of handleAuth override maybe).

is there any updates on this? same issue

same issue here. hope there is any update soon

I have the same issue. Anyone figured out how to make it work?

I have the same error. Does anyhow have a workaround. I don’t want to get into custom error pages.