We need to prompt user for additional information on the initial signin page, using a dropdown with set values. When login is initiated, we need to be able to access the entered value so that we can use it to determine which of our databases the user data is in, and check the credentials there. Any tips? We’ve tried the following:
- Making a custom form with a dropdown that captures the information we want. Problem: that data is not available in the context in the custom database login script, so is unusable
- Setting up organizations, and set up the login flow so that the user types in their organization name before entering username/password. Problem: our users. don’t know/will forget their organization names, especially since they need to case-match (for use in scripts)
- Setting up organizations, and set up login flow so that users will be prompted for the organization (with a dropdown) after entering username/password. Problem: The custom login script is executed before the option to enter an organization appears, so the script (which requires the organization name to be in context) fails
Hi @capndave,
Typically, additional information is collected on the signup pages during user registration. If you are only collecting information about the user’s organization, then this can be done on the login page. See Login Flows for Organizations.
This might be a great fit for your use case since your custom database scripts can access the organization’s details, such as id
, name
, and metadata
. (Reference: Custom Database Support For Organizations)
It will also be worth reviewing our Multiple Organization Architecture and Single Identity Provider Organizations documentation.
Let me also clarify that the custom database action scripts cannot directly access the Auth0 user profile since they only interact with the custom database. So, it is tricky to determine which connection they belong to on the login page.
You could work around this by determining the user’s custom database connection ahead of time and passing it in as the connection
query parameter in the login request. Or if you prefer, you can use the organization approach and pass in the org_id
as well.
Let me know if you have any questions.
Thanks,
Rueben