Hi Everyone,
I’m trying to implement Auth0 on my B2B SaaS product. Each of our customers (company) own its own url (ie: customera.myproduct.app, customerb.myproduct.app, …). Each customers has multiple users (a same email can exist under different customer environment).
I discovered your Organization feature and it works quite well for our needs. But i’m facing an issue regarding the redirection (a) and i have some feature questions/request (b).
(a) After a successful login, i would like to redirect the user to the right environment url. My <Auth0Provider />
is initiated with redirectUri={window.location.origin}
, which can be login.myproduct.app
for instance. I would like then to redirect my user to customera.qollabi.app
.
Is there a way to define a redirection URL per organization ? I tried by using organization metadata and a rule, but it doesn’t work.
context.redirect = {
url: context.organization.metadata.myorganizationurl
};
I’m properly redirected to the metadata url, but this one only contains the state and not the authorization code… Any clue ?
(b)
B.1 would be nice to be able to solve organization url more easily than via rules/metadata etc.
B.2 would be nice to be able to define more security policies per organization. For now i can define password policy, but i would like for example to be able to define MFA as required for all users within a specific organization
B.3 documentation seems wrong at this page: Application Settings. I cannot use {org_name} as token in my callback urls (i always receive an error)… i need to use {organization_name} to avoid error message. Can you confirm that i’m right using {organization_name} instead of {org_name}
B.4 in my <Auth0Provider>
(react component (auth0-react package)), i can pass an organization_id. Would be way easier to provider the organization name instead (as this is defined by us, not by a random value like the auth0 organization_id). Now, i need to make a mapping on my side to map my url to a auth0 organization_id… beurk
B.5 i tried the invitation feature of the organization section. I invite a user and i specify a auth0 database as connection (user doesn’t exist yet in that connection). Email is sent, but the user connect accept the invitation as he/she doesn’t have a user account on that connection yet. I could already create the user account before the invitation, but that would mean that the user would receive a verification email before the invitation email… beurk … I think this is not really an issue with Entreprise connection (like SSO) as user account are already created on that end.