我为我的网站创建了一个漂亮的小登录脚本,该脚本现在允许用户使用Facebook或Google登录。
我想做的是设置一些检查,以确保重复项不会出现在数据库中。
这是我介绍的一些方案:
我正在考虑的是允许用户链接帐户,以便不会发生警报过程,因为我可以通过我的网站将我的facebook帐户链接到我的google帐户,反之亦然,等等。
我要问的是:
我还有其他可能遗失的支票吗?这听起来合理吗?我在做什么,这使您对登录过程产生疑问?
基本上就此提出逻辑建议。
恭喜您!您几乎在正确的轨道上。让我们在这里细分情况。
理想情况
1. Registered on your site
2. Log in with Google
3. Log in with Facebook
现在,让我们在这里使用公分母,我的意思是主键。我想您的情况应该是电子邮件地址。
实际流程
1. User registers. You save the email address
或者,
2. User registers with Google/Facebook and you save the email address.
登入程序
1. You receive the email address either from direct login/facebook/google.
2. You match it against your table
3. On positive match, you link this social login to an existing account
如果,
4. It is not a positive match then you accept whatever data you receive and then forward
and then pass on to the registration page.
希望这可以帮助!如果您想了解其他任何信息,请告诉我。
干杯!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句