[英]Firebase Auth with Multiple Providers
Is it possible to link the email/password, google and Facebook sign in?是否可以链接电子邮件/密码、谷歌和 Facebook 登录?
I have successfully linked Google and Facebook sign in without any issue, however whenever I try to link Facebook with email/password & Google, I do get an error which is我已成功链接 Google 和 Facebook 登录,没有任何问题,但是每当我尝试使用电子邮件/密码和 Google 链接 Facebook 时,我都会收到错误消息
account-exists-with-different-credential
OR要么
can I just prevent using the same email(gmail.com) when using Google Sign in when the user already registered using email and password method.当用户已经使用电子邮件和密码方法注册时,我可以在使用 Google 登录时阻止使用相同的电子邮件 (gmail.com) 吗?
Note: I am using the same email for the three providers..注意:我为三个提供商使用相同的电子邮件。
There are no codes currently, since I do wanna ask first if this is the intended function of it.目前没有代码,因为我想先问一下这是否是它的预期功能。
I already tried using try
catch
for Google Sign in whenever the user signs in with a registered email via email
and password, however it does not catch using FirebaseAuthException
.每当用户通过
email
和密码使用注册电子邮件登录时,我已经尝试使用try
catch
进行 Google 登录,但是它不会使用FirebaseAuthException
进行捕获。
You can find the answer in the official documentation, following the link https://firebase.google.com/docs/auth/flutter/errors#handling_account-exists-with-different-credential_errors您可以在官方文档中找到答案,点击链接https://firebase.google.com/docs/auth/flutter/errors#handling_account-exists-with-different-credential_errors
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.