# Pass params to social provider using Universal Login (Params such as -\> prompt: 'select\_account' )

**URL:** <https://community.auth0.com/t/pass-params-to-social-provider-using-universal-login-params-such-as-prompt-select-account/82920>\
**Category:** Get Help\
**Tags:** google, social-provider, universal-login\
**Created:** [May 4, 2022, 10:26pm UTC](https://community.auth0.com/t/pass-params-to-social-provider-using-universal-login-params-such-as-prompt-select-account/82920 "2022-05-04T22:26:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![caledonia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/caledonia/32/33856_2.png) [@caledonia](https://community.auth0.com/u/caledonia)\
**Post date:** [May 4, 2022, 10:26pm UTC](https://community.auth0.com/t/pass-params-to-social-provider-using-universal-login-params-such-as-prompt-select-account/82920/1 "2022-05-04T22:26:44Z")

</div>

This question is similar to:

- [Change and see Google account when login](https://community.auth0.com/t/change-and-see-google-account-when-login/7132) – except that in our case, we are using Universal Login.
- [How do I force the Universal Login to allow the user to select a gmail account? - #11 by caledonia](https://community.auth0.com/t/how-do-i-force-the-universal-login-to-allow-the-user-to-select-a-gmail-account/72655/11) – this question was never closed but seems similar. I left a comment in that thread, too.

**Our configuration**  
We are using Universal Login, with Google as our social provider. We also have a Login Action in place that functions as an allowlist: Only email domains in the allowlist are issued tokens. If a user with an invalid domain attempts to login, they will be gated from the application and see an error.

**The issue**  
If a user logs in with a Google account with an invalid domain, they becomes gated from the application due to our allowlist action, but the Universal Login screen keeps authorizing-ing them based on the same [incorrect] Google account. There is no option to change accounts.

It is suggested [here](https://community.auth0.com/t/change-and-see-google-account-when-login/7132/2), for a similar issue, to use an option supported by Google that allows the user to select another account: `prompt=select_account`. Apparently this param should be included in the Google login request.

There doesn’t seem to be a documented way to include this param in the call to `webAuth.authorize`, which is what the Universal Login page uses. I don’t see this as a valid prompt in the [webAuth.authorize documentation](https://auth0.github.io/react-native-auth0/WebAuth.html). Is there a way to do this with Universal Login?

Here’s the relevant snippet of code from our Universal Login page code, where we are attempting to pass a `prompt` to the authorize call:

```auto
var params = Object.assign({
    overrides: {
        __tenant: config.auth0Tenant,
        __token_issuer: config.authorizationServer.issuer
    },
    domain: config.auth0Domain,
    clientID: config.clientID,
    redirectUri: config.callbackURL,
    responseType: 'code'
}, config.internalOptions);

var webAuth = new auth0.WebAuth(params);
var captcha = webAuth.renderCaptcha(
    document.querySelector('.captcha-container')
);

function loginWithGoogle() {
    webAuth.authorize({
        connection: 'google-oauth2',
      	prompt: 'select_account'
    }, function (err) {
        if (err) displayError(err);
    });
}

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 7, 2023, 12:29am UTC](https://community.auth0.com/t/pass-params-to-social-provider-using-universal-login-params-such-as-prompt-select-account/82920/2 "2023-01-07T00:29:37Z")

</div>

I apologize for the super delayed response - I’ve been combing through a bit of our backlog and wanted to be sure and link to what looks to be a solution in the topic you’ve linked to previously for future reference:

> [@How do I force the Universal Login to allow the user to select a gmail account?](https://community.auth0.com/t/how-do-i-force-the-universal-login-to-allow-the-user-to-select-a-gmail-account/72655/12):
>
> I ended up adding ""options":{upstream\_params": {"prompt":{"value":"select\_account"}}} to my connection through the management API and that allowed the prompt to do select account.

Hopefully this helps others!

---

<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 21, 2023, 12:29am UTC](https://community.auth0.com/t/pass-params-to-social-provider-using-universal-login-params-such-as-prompt-select-account/82920/3 "2023-01-21T00:29:51Z")

</div>

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