Next.js | Blank screen after Google social login with non-organization user

I am using Next.js and @auth0/nextjs-auth0 npm package.
When user which is not included to organization logins via Google, callback redirect happens with an error details but the screen is blank.

Hi @eng1,

The error you are experiencing is expected when the user is not a part of the organization, and the Google Social Connection enabled for the organization does not assign members to the Organization on login.

In this scenario, you can either permit the user to log in to your app without being associated with an organization (if that is your intention), or you can Grant Just-In-Time Membership to an Organization Connection.


@rueben.tiow getting the error is fine, the thing is that Default Error screen is not displayed - is it something we should configure on our end for Next.js? If this is happened, I am not able to log in again after page reload until I clear current session with wrong user.

Hi @eng1,

Thanks for the reply.

Have you tried monitoring the network activity when the Default Error page is not displayed? There might be some clues there.

If you need to forcibly end the session, you can call the /v2/logout endpoint in the browser. For example:

Another option to consider is redirecting your users to your custom error page instead of displaying the default error page. Refer to the Custom Error Pages documentation to learn more.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.