Custom universal login page get realm value dynamic as per client id

 var params = Object.assign({
            /* additional configuration needed for use of custom domains */
            overrides: {
              __tenant: config.auth0Tenant,
              __token_issuer: 'login.****.com'
            domain: config.auth0Domain,
            clientID: config.clientID,
            redirectUri: config.callbackURL,
            responseType: 'code'
        }, config.internalOptions);

var webAuth = new auth0.WebAuth(params);
var databaseConnection = "my_databse_connect";

function login(e) {
    var username = document.getElementById('email').value;
    var password = document.getElementById('password').value;
        realm: databaseConnection,
        username: username,
        password: password
    }, function (err) {
         if (err) displayMessage(err);

in this code i want get realm: databaseConnection, this value as per my application it should be fetched dynalically as the auth0 lock does.

please someone help.

Welcome to Auth0 Community, @siddhant.

To understand what’s going on, can you please elaborate more on where you are using this code and your use case?

Thank you!

hello hi, thanks for the reply,

I am using this code in a custom universal login template and what I am trying is to authorize different applications with different auth0 databases but in the above code I have to give the database name because of that I only able to use one database. That is why I want something that with when an application is used for login i am able to get connection(databaseConnection) name with it and can pass it in realm: databaseConnection, here.

thank you.