[英]How can I verify if an email address is already use by a provider (Google or Facebook)?
In my web app I use login Firebase ( Google and Facebook ). 在我的Web应用程序中,我使用登录Firebase( Google和Facebook )。
But I would like to prevent the user if their email address is already in use by Google or Facebook . 但是我想阻止用户,如果他们的电子邮件地址已经被Google或Facebook使用 。
Example: 例:
If my user would like connect with Google , their email address is user@example.com and after they would like to connect but with Facebook and his email address for Facebook is the same (user@example.com) . 如果我的用户想与Google联系 ,则他们的电子邮件地址为user@example.com ,在他们想与之联系但与Facebook联系之后 ,他用于Facebook的电子邮件地址也相同(user@example.com) 。
How I can verify if the email address already exists? 如何验证电子邮件地址是否已经存在?
Check out this links on firebase docs it should help you out with facebook login there are more examples on the site including that of google login 在Firebase文档上查看此链接,它应该可以帮助您使用Facebook登录,网站上还有更多示例,包括Google登录
https://firebase.google.com/docs/auth/web/facebook-login#handling-account-exists-with-different-credential-errors https://firebase.google.com/docs/auth/web/facebook-login#handling-account-exists-with-different-credential-errors
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.