Add support for Facebook authentication
This commit is contained in:
parent
a1f73967a9
commit
c9893e186b
13 changed files with 248 additions and 4 deletions
|
@ -21,6 +21,7 @@ end
|
|||
|
||||
openid_options = { :name => "openid", :store => openid_store }
|
||||
google_options = { :name => "google", :scope => "email", :access_type => "online" }
|
||||
facebook_options = { :name => "facebook", :scope => "email" }
|
||||
|
||||
if defined?(GOOGLE_OPENID_REALM)
|
||||
google_options[:openid_realm] = GOOGLE_OPENID_REALM
|
||||
|
@ -29,6 +30,7 @@ end
|
|||
Rails.application.config.middleware.use OmniAuth::Builder do
|
||||
provider :openid, openid_options
|
||||
provider :google_oauth2, GOOGLE_AUTH_ID, GOOGLE_AUTH_SECRET, google_options if defined?(GOOGLE_AUTH_ID)
|
||||
provider :facebook, FACEBOOK_AUTH_ID, FACEBOOK_AUTH_SECRET, facebook_options if defined?(FACEBOOK_AUTH_ID)
|
||||
end
|
||||
|
||||
# Pending fix for: https://github.com/intridea/omniauth/pull/795
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue