Custom Login Form
Login with Google did let the user select another account. Let’s say a user logs in with Google and selects Account A. After that, they log out and want to log in again with Account B. However, when the user clicks on “Login with Google,” it automatically logs them in with Account A without showing other account options.
<script src="https://cdn.auth0.com/js/auth0/9.26/auth0.min.js"></script>
<script src="https://cdn.auth0.com/js/polyfills/1.0/object-assign.min.js"></script>
<script>
window.addEventListener('load', function () {
var config = JSON.parse(
decodeURIComponent(escape(window.atob('@@config@@')))
);
var leeway = config.internalOptions.leeway;
if (leeway) {
var convertedLeeway = parseInt(leeway);
if (!isNaN(convertedLeeway)) {
config.internalOptions.leeway = convertedLeeway;
}
}
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 triggerCaptcha = null;
var webAuth = new auth0.WebAuth(params);
function loginWithGoogle() {
webAuth.authorize({
connection: 'google-oauth2',
prompt: 'select_account'
}, function (err) {
if (err) displayError(err);
});
}
document.getElementById('btn-google').addEventListener('click', loginWithGoogle);
});
</script>
i have pass promt : 'select_account'
but it did’t show list of accounts