I'm using omniauth-facebook gem & devise gem to accomplish the facebook login on my site (Rails website). When using facebook login, I'll request email field and save it in my database. Everything works fine so far. But I found there are two situations I can't receive email fields.
- When user register facebook by phone and try to login my site with facebook, the returned email field would be nil.
- When user register facebook by email, but decline the email permission during authorization, the returned email field would be nil.
I can't differentiate these two situations, because the email are all nil. Does anyone meet the same problem and get a nice solution or workaround?
Much appreciated:)