简体   繁体   English

有什么方法可以检测Twitter用户是否已验证其电子邮件地址?

[英]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.

相关问题 有没有办法获得Twitter用户的电子邮件? - Any way to get Twitter user email? 如何使用twitter api获取twitter用户的电子邮件地址 - How to get the email address of twitter user with twitter api 有没有办法使用Twitter API计算特定用户的Twitter推文? - any way to count twitter tweets of a particular user using Twitter API? Arcanist API-一种使用用户名返回用户电子邮件地址的方法吗? - Arcanist API - A way to return user email address using username? Laravel 和 jwt-auth。 如何检查用户电子邮件是否经过验证 - Laravel and jwt-auth. How to check if user email is verified Twitter API-如何从access_token获取用户详细信息,例如名字,姓氏和电子邮件地址 - Twitter API - How to get User Details like First Name, Last Name and Email Address from access_token 有没有一种方法可以检查用户是否使用Twitter登录? - Is there a way to check if a user is signed in with Twitter? Laravel 返回 email 即使已验证也未验证 - Laravel returning email not verified even it is verified 使用Twitter API获取用户电子邮件 - Getting user email using Twitter API 如何使用 Firebase Auth API 发送 email 验证并在登录前检查用户是否通过验证 - How to use Firebase Auth API to send email verification and check whether the user is verified before logging in
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM