User signup without Organization causing infinite loop

Our Auth0 app uses the ‘Business Users’ model and Login Flow of Prompt for credentials as this is the desired behavior. Which means only users bound to an Organization can sign in or sign up. The only way to prevent Social Login is through Post Login Action as described many times in the community channels.

The issue is that Post Login action is not being executed since the new not-bounded to organization user׳s browser is attempting to redirect to a URL that should contain organization_id:
http://localhost:3000/?error=invalid_request&error_description=client requires organization membership%2C but user does not belong to any organization&state=XXXXXXXXXXXX”.
And the user experiencing an infinite loop without any knowledge it does not belong to an organization.

I want to be able to tell the user gracefully that he doesn’t belong to any Organization and make Post login action runs properly.

Really desperate for help. Thanks.

Hello @daniel28,

Welcome to the Auth0 Community!

Based on my observation, the first thing that came to mind in the described flow is the fact that users cannot be added to the Organization in question based on your current settings, and since belonging to the Organization is required for a successful login, this creates the issue.
My recommendation is to enable Auto-Membership and test with either having Organization Signup enabled ( on the same page, after enabling Auto-Membership, you can select " Enable Signup" under Organization Signup) or disabled. I do recommend his following Knowledge Base article and watching the video attached regarding Organization Sign up.

Merry Christmas :christmas_tree:
Gerald