From 988ee11fe4165d8856f5d8a105bf95777168a8b0 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Mon, 30 Nov 2015 02:42:07 -0500 Subject: [PATCH] Facebook emails are verified Per https://developers.facebook.com/docs/graph-api/reference/user the offical description of the email field is: > The person's primary email address listed on their profile. This > field will not be returned if no valid email address is available Therefore we can treat the fact that the email is returned as proof that it has been verified. --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index fca0e3be7..6390ff19e 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -497,7 +497,7 @@ class UserController < ApplicationController when "openid" email_verified = uid.match(%r{https://www.google.com/accounts/o8/id?(.*)}) || uid.match(%r{https://me.yahoo.com/(.*)}) - when "google" + when "google", "facebook" email_verified = true else email_verified = false -- 2.39.5