Skip to content

Instantly share code, notes, and snippets.

@drKreso
Created November 3, 2018 11:12

Revisions

  1. drKreso created this gist Nov 3, 2018.
    13 changes: 13 additions & 0 deletions config-initializers-oauth.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # config/initializers/oauth.rb
    Rails.application.config.middleware.use OmniAuth::Builder do
    provider :facebook,
    ENV['FACEBOOK_APP_ID'],
    ENV['FACEBOOK_SECRET_ID'],
    scope: 'email',
    info_fields: 'email',
    auth_type: 'rerequest'

    configure do |config|
    config.path_prefix = '/users/auth'
    end
    end