diff --git a/Gemfile b/Gemfile
index 95ce82135..6365cc67f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -23,7 +23,7 @@ gem 'devise'
# gem 'bcrypt', '~> 3.1.7'
gem 'omniauth'
gem 'omniauth-twitter'
-# gem 'omniauth-facebook'
+gem 'omniauth-facebook'
# gem 'omniauth-google-oauth2'
gem 'kaminari'
diff --git a/Gemfile.lock b/Gemfile.lock
index d1a5ece7b..0023fb231 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -133,6 +133,8 @@ GEM
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
+ faraday (0.9.1)
+ multipart-post (>= 1.2, < 3)
foundation-rails (5.5.2.1)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
@@ -170,6 +172,7 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
+ jwt (1.5.1)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
@@ -190,6 +193,8 @@ GEM
mini_portile (0.6.2)
minitest (5.8.0)
multi_json (1.11.2)
+ multi_xml (0.5.5)
+ multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
@@ -197,12 +202,23 @@ GEM
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
oauth (0.4.7)
+ oauth2 (1.0.0)
+ faraday (>= 0.8, < 0.10)
+ jwt (~> 1.0)
+ multi_json (~> 1.3)
+ multi_xml (~> 0.5)
+ rack (~> 1.2)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
+ omniauth-facebook (2.0.1)
+ omniauth-oauth2 (~> 1.2)
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
+ omniauth-oauth2 (1.3.1)
+ oauth2 (~> 1.0)
+ omniauth (~> 1.2)
omniauth-twitter (1.2.1)
json (~> 1.3)
omniauth-oauth (~> 1.1)
@@ -374,6 +390,7 @@ DEPENDENCIES
launchy
letter_opener_web (~> 1.3.0)
omniauth
+ omniauth-facebook
omniauth-twitter
paranoia
pg
diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb
index aac6583d1..a0a90c400 100644
--- a/app/controllers/users/omniauth_callbacks_controller.rb
+++ b/app/controllers/users/omniauth_callbacks_controller.rb
@@ -16,7 +16,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
# [:twitter, :facebook, :google_oauth2].each do |provider|
- [:twitter].each do |provider|
+ [:twitter, :facebook].each do |provider|
provides_callback_for provider
end
diff --git a/app/views/devise/_omniauth_form.html.erb b/app/views/devise/_omniauth_form.html.erb
index 888a3ba2f..cf06d359f 100644
--- a/app/views/devise/_omniauth_form.html.erb
+++ b/app/views/devise/_omniauth_form.html.erb
@@ -1,5 +1,6 @@
<%= link_to t("omniauth.twitter.sign_in"), user_omniauth_authorize_path(:twitter), class: 'button radius expand' %>
+<%= link_to t("omniauth.facebook.sign_in"), user_omniauth_authorize_path(:facebook), class: 'button radius expand' %>