Pre-Login Trigger: Ability to activate a Form before the post-login trigger

Feature: a new “pre-login” trigger that can also render a form

Activates synchronously before post-login, but after the user is registered.
Works regardless of the login experience settings in the application’s configuration.

Description:

Having Auth0’s Form rendered before a user is “fully authenticated” would be beneficial in many use cases involving new users & self-service registration support. Even more so for the B2B, multi-tenant cases.

Use-case:

Concrete example:

React App: Login XP set to Business Users ← desired state

Currently, OOTB net-new users cannot trigger post-login actions/forms because they encounter an error beforehand:

error=invalid_request&error_description=client requires organization membership, but user does not belong to any organization

This requires customizations to handle. I have 2 known workarounds:

  1. Silently re-auth the user in the context of the org. Needs a method of passing the org_id and/or org_name. I’m using the User’s app_metadata for this via the custom k:v entries: created_org_id & created_org_name. For this setup, your Application needs to have the Login Experience set to Both: personal and business users.
    This is not a desirable state for those who only want and need organizations. Now the org picker will render for all users, and they must select between their personal and business contexts. If they select personal, you trigger the same silent re-auth’ing logic to guide the user into their created_org_idcontext.
  2. …you could have a dummy/default organization set up on your tenant in which all new users are added after registration until they receive and accept the invite for the one created… Source

Community thread about this here