admin管理员组文章数量:1327258
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
1 Answer
Reset to default 10You 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
版权声明:本文标题:javascript - Firebase: How to always force a sign-in? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742211261a2433756.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论