Rails + omniauth + facebook - csrf detected

后端 未结 3 1059
庸人自扰
庸人自扰 2021-01-06 04:01

I\'m working on logging in a site via existing facebook account. So I registered a facebook application and stored api and secret

3条回答
  •  离开以前
    2021-01-06 04:09

    I solved this issue when I deleted 'omniauth.rb' because I already have this config below in devise.rb:

      config.omniauth :facebook, ENV["FB_ID"], ENV["FB_SECRET"],
        scope: 'email',
        info_fields: 'email, first_name, last_name',
        image_size: 'large',  # 50x50, guaranteed ratio
        secure_image_url: true
    

    Remember to restart the sever to test.

提交回复
热议问题