[英]Is there any way to detect if a Twitter user verified their email address?
I have a whitelisted Twitter app that can request and receive email address of a twitter account when the owner of the account accepts and logs in through my app. 我有一个列入白名单的Twitter应用程序,当帐户的所有者通过我的应用程序接受并登录时,它可以请求并接收Twitter帐户的电子邮件地址。
Now, I plan to connect it to my already available "Sign-up/Login by email" flow seamlessly. 现在,我计划将其无缝连接到我已经可用的“通过电子邮件注册/登录”流程。
The problem is, logged in Twitter user may not have verified their email account. 问题是,登录的Twitter用户可能尚未验证其电子邮件帐户。 In that case they can hijack a user on my system who signed-up with that email. 在这种情况下,他们可以劫持在我的系统上使用该电子邮件注册的用户。
Therefore, I have to be sure that they have verified their email address. 因此,我必须确保他们已经验证了他们的电子邮件地址。 Otherwise I have to automatically send a confirmation link to the email address of the just-signed-in twitter user. 否则,我必须自动发送一个确认链接到刚登录的Twitter用户的电子邮件地址。
Is there any way to detect if the user confirmed their email address on Twitter? 有什么方法可以检测用户是否在Twitter上确认了自己的电子邮件地址? If not, what is the general solution to this problem? 如果没有,一般的解决方案是什么? At least, how do you solve it for yourselves? 至少,您如何自己解决问题?
I found out that if the user does not verify their email address, Twitter will not return the email address even though it is there. 我发现,如果用户不验证其电子邮件地址,即使该地址存在,Twitter也不会返回该电子邮件地址。 So, if you receive an email address from Twitter, that should mean that the email address of the user is verified. 因此,如果您收到来自Twitter的电子邮件地址,则意味着该用户的电子邮件地址已通过验证。
If anyone finds that this is not correct, please leave your comment or your findings. 如果有人发现这是不正确的,请留下您的评论或发现。
Twitter returns a 0 length string in field email if user didn't verify his email. 如果用户未验证他的电子邮件,Twitter将在字段电子邮件中返回一个长度为0的字符串。
...
translator_type: 'none',
email:''}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.