admin管理员组

文章数量:1327452

Working in Eclipse, & using the provided methods in Firebase' docs, I was able to setup logins for several providers such as Google and Facebook, using the redirect option. I basically click on a button for the provider on my web page, & it takes me to the login screen where I can enter a UID and password (e.g. Google sign-in)

However, once I authenticate properly with a valid account, and even if I sign-out, I get logged into the same account, without ever getting the screen prompting to log in. Where is this information persisted? Closing out Eclipse, or turning the puter off, does nothing to help, so I believe this is all being saved somewhere.

How do I "forget" previous attempts, so that I can see a provider's log in screen, each and every time?

Working in Eclipse, & using the provided methods in Firebase' docs, I was able to setup logins for several providers such as Google and Facebook, using the redirect option. I basically click on a button for the provider on my web page, & it takes me to the login screen where I can enter a UID and password (e.g. Google sign-in)

However, once I authenticate properly with a valid account, and even if I sign-out, I get logged into the same account, without ever getting the screen prompting to log in. Where is this information persisted? Closing out Eclipse, or turning the puter off, does nothing to help, so I believe this is all being saved somewhere.

How do I "forget" previous attempts, so that I can see a provider's log in screen, each and every time?

Share Improve this question edited Mar 24, 2017 at 8:36 KENdi 7,7792 gold badges18 silver badges31 bronze badges asked Mar 24, 2017 at 5:28 Adam LawAdam Law 5421 gold badge7 silver badges21 bronze badges 2
  • Does anyone have any more input? It seems to me that there should be a mechanism in Firebase to do this, since it would be unusable in a public setting, such as an internet cafe, or library. – Adam Law Commented Mar 28, 2017 at 9:43
  • Related question, also without answers: stackoverflow./questions/32433378/… – Edward Shtern Commented Jun 23, 2020 at 16:00
Add a ment  | 

1 Answer 1

Reset to default 10

You can use setCustomParameters on AuthProviders. For example, in the case of Google: https://firebase.google./docs/reference/js/firebase.auth.GoogleAuthProvider#setCustomParameters

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

This will not forget the previous attempt but it will prompt the user to select an existing account or a new one.

本文标签: javascriptFirebase How to always force a signinStack Overflow