Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to check if an email is confirmed on Facebook?

Update

This was reported to Facebook via https://www.facebook.com/whitehat/report/ on Dec 16th 2013 and Facebook responded on Dec 17th that the bug has long since been fixed.

I have retested this with my Facebook account (that I still haven't verified the email address on) and when using the Grap API Explorer tool it is not possible to get the email address of this account using the Graph API or using a FQL query.

Conclusion: The email address you get from Facebook using the Graph API or a FQL query is a verified email. If an account hasn't verified it's email yet it's not possible to get it.

Original Post

I am making a web app with SSO that is offering the user to sign in with either Google or Facebook. I would like users who have both types of accounts to show up as the same user in my system regardless of which identity they log in with. To achieve this I'm thinking of using the email address as the identifier to know if I should create a new account or if the user already exists.

To not introduce any security problems I must know that the email address is verified and actually belongs to the user. For Google the userinfo API can tell me if an email is verified or not, so there's no problem here. But I can not find anything like this in the Facebook Graph API.

Is it possible to know if an email address is confirmed on Facebook?

I know that there is a verified field, but that only tells if the account is verified and not the email address.

At first it looked like you are only able to use the Graph API for accounts where the email address has been confirmed. If the address wasn't confirmed I just got an error telling me that I had to confirm the email address first before being able to sign in to any third party site.

However this does not seem to be true for all accounts. In some cases it's possible to get accesses to all parts of Facebook even if you don't have a confirmed email address. One example of this is when you sign up with a @myopera.com mail address.

When you sign up to Facebook with a @myopera.com email address you get a message that your account has been temporarily locked as soon as you submit the sign up form. To continue you need to provide your phone number to verify your account and to "keep Facebook safe and free from spam" (sorry for the Swedish in the screenshot, this was before I could get into Facebook and change language to English):

Security check during sign up

When you provide your phone number you are logged in and Facebook doesn't nag you any further about that you have to verify your email address.

The only place where you can see that your email address is not yet verified is on the settings page:

Facebook settings view with unconfirmed email address

The Mobile Settings that is usually not accessible before you have verified your email address is available and lists the phone number entered during sign up:

Facebook mobile settings view with unconfirmed email address

In addition to this it is also possible to log in to third party sites with an unconfirmed email address:

Logging in to graph API explorer with an unconfirmed email address

When I connect to the graph api with this user I can get the unconfirmed email address and the verified field returns true as expected since I have verified the account by adding a phone number. So obviously I can't trust that the email address I get from Facebook really belongs to the user that has the Facebook account.

Is there any other way of knowing if the email address is verified or not or do I have to verify it myself if I want to use it for identifying the user?

like image 299
nibarius Avatar asked Jan 11 '13 14:01

nibarius


People also ask

How do I know if my email was sent on Facebook?

If you're unsure if an email you received was from Facebook, you can check its legitimacy by visiting facebook.com/settings to view a list of security-related emails that have been recently sent.”

How do I see pending email addresses on Facebook?

To confirm your email, click or tap the link in the email you got when you created the account. Learn what to do if you can't find the email. Confirming your email or mobile number helps us know that we're sending your account info to the right place.

Why have I not received a Facebook confirmation email?

Try these steps if you can't find your Facebook signup confirmation email. Check your email notification settings to make sure that you haven't turned off email notifications. Check your spam or junk email filter to make sure that emails coming from Facebook aren't being placed in this folder.

Does Facebook verify email address?

When a FB account gets created with an email, or an email gets added to the account, FB sends a verification link to the email address. But, sometimes the recipient ignores or misses this verification email and then the email address on the account remains unverified.


2 Answers

I was looking for an official Facebook statement regarding this issue and finally i found this: https://developers.facebook.com/docs/facebook-login/multiple-providers#postfb1, which clearly says that developer should not rely on the fact that email address is verified.

like image 118
jano Avatar answered Sep 18 '22 19:09

jano


I've never used it, but you may be able to check with a FQL query of the user.email_hashes: http://developers.facebook.com/docs/reference/fql/user

like image 44
Johntron Avatar answered Sep 21 '22 19:09

Johntron