# How to prompt user for additional data on signin page and use that data in custom database login script

**URL:** <https://community.auth0.com/t/how-to-prompt-user-for-additional-data-on-signin-page-and-use-that-data-in-custom-database-login-script/167936>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [January 8, 2025, 5:43pm UTC](https://community.auth0.com/t/how-to-prompt-user-for-additional-data-on-signin-page-and-use-that-data-in-custom-database-login-script/167936 "2025-01-08T17:43:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![capndave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/capndave/32/60163_2.png) [@capndave](https://community.auth0.com/u/capndave)\
**Post date:** [January 8, 2025, 5:43pm UTC](https://community.auth0.com/t/how-to-prompt-user-for-additional-data-on-signin-page-and-use-that-data-in-custom-database-login-script/167936/1 "2025-01-08T17:43:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 10, 2025, 8:40pm UTC](https://community.auth0.com/t/how-to-prompt-user-for-additional-data-on-signin-page-and-use-that-data-in-custom-database-login-script/167936/3 "2025-01-10T20:40:39Z")

</div>

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](https://auth0.com/docs/manage-users/organizations/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](https://auth0.com/docs/authenticate/database-connections/custom-db/create-db-connection#custom-database-support-for-organizations))

It will also be worth reviewing our [Multiple Organization Architecture](https://auth0.com/docs/get-started/architecture-scenarios/multiple-organization-architecture) and [Single Identity Provider Organizations](https://auth0.com/docs/get-started/architecture-scenarios/multiple-organization-architecture/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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 24, 2025, 8:40pm UTC](https://community.auth0.com/t/how-to-prompt-user-for-additional-data-on-signin-page-and-use-that-data-in-custom-database-login-script/167936/4 "2025-01-24T20:40:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
