diff --git a/Gemfile b/Gemfile index 72da4c4f4..a26a5b7c1 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,9 @@ gem 'turbolinks' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development +gem 'omniauth' +gem 'omniauth-facebook' + group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' diff --git a/Gemfile.lock b/Gemfile.lock index f1add80b9..a2676afa3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,15 +55,19 @@ GEM erubis (2.7.0) eventmachine (1.2.7) execjs (2.7.0) + faraday (1.0.1) + multipart-post (>= 1.2, < 3) ffi (1.11.1) globalid (0.4.2) activesupport (>= 4.2.0) + hashie (4.1.0) i18n (1.6.0) concurrent-ruby (~> 1.0) jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) + jwt (2.2.1) loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -73,9 +77,26 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.11.3) + multi_json (1.14.1) + multi_xml (0.6.0) + multipart-post (2.1.1) nio4r (2.4.0) nokogiri (1.10.5) mini_portile2 (~> 2.4.0) + oauth2 (1.4.4) + faraday (>= 0.8, < 2.0) + jwt (>= 1.0, < 3.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + omniauth (1.9.1) + hashie (>= 3.4.6) + rack (>= 1.6.2, < 3) + omniauth-facebook (6.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-oauth2 (1.6.0) + oauth2 (~> 1.1) + omniauth (~> 1.9) pry (0.12.2) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -154,6 +175,8 @@ DEPENDENCIES byebug coffee-rails (~> 4.1.0) jquery-rails + omniauth + omniauth-facebook pry rails (~> 5.0) sass-rails (~> 5.0) diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb new file mode 100644 index 000000000..22b807c19 --- /dev/null +++ b/config/initializers/omniauth.rb @@ -0,0 +1,3 @@ +Rails.application.config.middleware.use OmniAuth::Builder do + provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'] +end