Firebase google auth automatically selecting user. How to force it to select account

后端 未结 2 1591
一向
一向 2020-12-17 22:41

If in any browser, when i am logged in with single google account and try to invoke \'sign in with google\' option on firebase, it is automatically logging-in to firebase wi

相关标签:
2条回答
  • 2020-12-17 22:58

    This worked for me: https://groups.google.com/forum/#!topic/firebase-talk/gxBm0WKCuIY

    var provider = new firebase.auth.GoogleAuthProvider();
    provider.setCustomParameters({
      prompt: 'select_account'
    });

    0 讨论(0)
  • 2020-12-17 22:59

    If you're authenticating the user credential Using Google Sign-In with JavaScript, try to remove the follow line of code:

    provider.addScope('https://www.googleapis.com/auth/plus.login');
    

    After you clicked the sign in button, it will allow you to select a Google account that you want to use.

    0 讨论(0)
提交回复
热议问题