Ok, I spoke too soon It seems there is still a limitation, but maybe Iām missing something. First, let me lay out our requirements.
- This is a B2B SaaS app. So we sell to other businesses and their users can log in to use the app.
- There is a self serve flow for new businesses to onboard without any intervention from us. Users may sign up/authenticate without being part of an organization, but must create one before continuing.
- Users should only belong to at most 1 organization (their current employer). So if they do belong to an organization, they should be automatically logged into it. If we do support multiple org membership in the future, they should still never be allowed to log in as āindividualsā.
Problem:
If I select āBusiness Usersā, number 2 breaks. When a new user signs up they get this error.
But what I really want is for them to be signed in and prompted to create a new organization. We have this flow built out already.
If I instead select āBothā, number 3 above breaks. Users can sign in without an org and I can show them the prompt to create a new org. But then they get prompted to log in as individuals or the org, when we really only want to allow authenticating under the org:
Example
Slack is mentioned as an example under āBusiness Usersā, but thatās not quite true. Slack actually has the exact flow Iām interested in. If you sign up as a new user, youāre prompted to create a workspace:
If instead you sign up as a user with only one workspace membership, it logs you right into that workspace:
Sorry for the long post, just wanted to provide as much context as possible. Let me know if thereās a way to configure this flow with this new feature set, otherwise Iāll bring back the workaround where you fetch the userās org memberships and do silent re-auth.