Omniauth - Display facebook connect as popup

前端 未结 4 363
忘掉有多难
忘掉有多难 2020-12-31 08:44

I am using Omniauth and forcing /auth/facebook to display in a popup (with JS). [Instead of a new window - which is much less user friendly]

The problem is: Omniauth

相关标签:
4条回答
  • 2020-12-31 09:21

    If you're using heroku, then use this option:

    config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET'], {:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}, :display => 'popup' }
    
    0 讨论(0)
  • 2020-12-31 09:28

    If you're using this with Devise, simply edit your development.rb (and production.rb) to the following;

    config.omniauth :facebook, FACEBOOK_API, FACEBOOK_SECRET, :display => 'popup'
    

    Make sure you restart your rails server upon editing these files.

    0 讨论(0)
  • 2020-12-31 09:33

    Actually, in the current version of omniauth-facebook, this is what works for me:

    :authorize_params => { :display => 'popup' }
    
    0 讨论(0)
  • 2020-12-31 09:34

    At where you set your Facebook ID and secret key, add one more extra option as:

    :display => "popup"
    
    0 讨论(0)
提交回复
热议问题