How to get Application ID from the context of the database login script

Hi,

We have an application that’s running multiple sites, each with its own set of users. We want to change that to a single sign-on model. So perfectly we’d like to use multiple Applications with a single Database connected to it, pulling data from our backend via API, and that was fairly easy to implement. The problem, however, is that we need to know which application is trying to log in to identify the actual user (i.e. a single e-mail address can have multiple accounts for multiple sites on our side).

I’m looking for a way to identify the Auth0 Application context from within the login/user data scripts. Is there one?

Hi @tatarynowicz,

Welcome to the Community! I’m not sure if this answers your question or not: typically each application gets its own client (“Application” in the Auth0 dashboard) with its own Client ID, and that client ID should be available during the login process.

An Auth0 hosted database currently has a limitation that the email address must be unique within any single database. I seem to recall that support for multiple identities with the same email address is on the roadmap.