August 27 Auth0 Community Ask Me Anything: Actions

Hi Bjojoh, it is really good questions because we have same use case. And thank danilo.asissanchez for clarification because we were looking for same thing. We would like to set organization id in Pot login action.
Our use case: We have multitenant application which is hosted on one domain. All users has to be authenticated to use our app. Each user has to belong to one or many organizations. When user sign up to the system then he does not know organization id and therefor generic user is created. After that user lands in application where is a list of organizations and he can pick one which is his own and can request to join. Our requirement was that list of organizations is available only for authenticated users. When user selects organization and joining to it is automatically approved then the app redirects user to login page once again with org id and user is automatically add as member of org and we store org id in the user app metadata. When user returns back, then we know where the user belongs, but it is after successful login. Therefore we put org id into access token as our own claim and our app knows about that.

Auth0 feature to be able to define organization id would be nice because it could save code and energy.
Also for Auth0, we have three tenants Production, Staging and Dev and I would like to be logged into my last used tenant automatically. Instead of this I have to switch from production to dev each time after I log in.

1 Like

Thanks, everyone! This Actions AMA has concluded. :partying_face: You can revisit the discussion in this thread anytime. For past and future sessions, head to the AMA category. If you’d like a nudge to stay updated for future sessions, open that category and click the bell :bell: → Watching to get notified. We’re compiling a short summary/recap of today’s highlights and will share it here soon.

Dawid

1 Like