Ruby on Rails Omniauth facebook doesn't return email

后端 未结 5 1002
广开言路
广开言路 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:58

    I only got to retrieve the email by adding this in devise.rb:

      config.omniauth :facebook, "KEY", "SECRET", scope: 'email', info_fields: 'email, name'
    

提交回复
热议问题