You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAIK it is not possible to sign in to a specific organization. (unless you use provider: "authkit" which we don't want to use right now, we are using a custom flow.) We are also only using magic auth.
Use case:
We have a multi-tenant app, each tenant lives on a subdomain. It would be great to be able to log into tenant1 if we are on tenant1's domain. This usually works okay:
When the user is only part of tenant1
When the user is part of tenant1 and tenant2, we can let the log in fail (organization_selection_required) and then use the subdomain to select the correct organization.
When the user is part of tenant1 and has a pending invite to tenant2 (not necessary, just the example I came across) and tries to log in on tenant2 subdomain, it will log in to tenant1 workos organization without the organization_selection_required error.
How should we go about managing this? Right now, before creating a magic auth, we check the organization members to see if they exist and they have status of active. And if so, send a code, if not don't send code. And we display a message saying "if you are member you will receive code...". We know the organizationId before initiating a log in, so it would be great to be able to just provide this when creating the magic auth.
The text was updated successfully, but these errors were encountered:
AFAIK it is not possible to sign in to a specific organization. (unless you use
provider: "authkit"
which we don't want to use right now, we are using a custom flow.) We are also only using magic auth.Use case:
We have a multi-tenant app, each tenant lives on a subdomain. It would be great to be able to log into tenant1 if we are on tenant1's domain. This usually works okay:
organization_selection_required
) and then use the subdomain to select the correct organization.organization_selection_required
error.How should we go about managing this? Right now, before creating a magic auth, we check the organization members to see if they exist and they have status of active. And if so, send a code, if not don't send code. And we display a message saying "if you are member you will receive code...". We know the organizationId before initiating a log in, so it would be great to be able to just provide this when creating the magic auth.
The text was updated successfully, but these errors were encountered: