Discovery flow
Authenticate with discovery
Use any discovery authentication method (Email Magic Link, Email OTP, OAuth, or Password) to get an After the member clicks the magic link, extract the Response:
intermediate_session_token:Example with Email Magic Link:discovery_magic_links_token from the callback URL and authenticate:List discovered organizations
Get all organizations the member can access using the List Organizations endpoint:Response includes organizations where the member:
active_member- Already a memberpending_member- Has a pending inviteinvited_member- Has been invitedeligible_to_join_by_email_domain- Email domain matches organization’s allowed domainseligible_to_join_by_oauth_tenant- OAuth tenant matches organization’s allowed tenants
Join organization or create new
The member can now choose to join an existing organization or create a new one:
- Join Existing Organization
- Create New Organization
Exchange the intermediate session for a full member session using the Exchange Intermediate Session endpoint:Response:If the organization requires MFA, the response will have
member_authenticated: false and include a new intermediate_session_token to complete the MFA challenge.Discovery vs Organization-specific login
Discovery
- Member authenticates without specifying organization
- Sees all organizations they can access
- Can create new organizations
- Uses
discovery_auth endpoints - Returns
intermediate_session_token
Organization-specific
- Member authenticates to a specific organization
- Typically uses organization slug in URL
- Direct login to known organization
- Uses standard auth endpoints with
organization_id - Returns full
session_token