Ruby on Rails Omniauth facebook doesn't return email

后端 未结 5 1000
广开言路
广开言路 2020-12-19 06:07

I have been trying for days to setup my Omniauth for facebook I don\'t know what am I doing wrong.

I am not able to get the email of the user. The returned hash only

5条回答
  •  無奈伤痛
    2020-12-19 06:44

    I had the same problem but it turns out it was a different issue, if you use a client side flow make sure to request the scopes you need on your client:

    FB.login(function(response) {
      // hit API callback endpoint
    }, {scope: 'email'});
    

提交回复
热议问题