Skip to content
Snippets Groups Projects
Commit a106d73c authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'Social-authentication' into 'master'

Added Omniauth config/initializers, removed skipped omniauth callback

See merge request !321
parents 656d0932 3612a920
No related branches found
No related tags found
No related merge requests found
......@@ -76,5 +76,14 @@ module Portalmec
# api mode
config.api_only = true
#TODO fix ugly code when omniauth is fixed
# Only loads a smaller set of middleware suitable for API only apps.
# Middleware like session, flash, cookies can be added back manually.
# Skip views, helpers and assets when generating a new resource.
config.middleware.use ActionDispatch::Flash
config.middleware.use ActionDispatch::Cookies
config.middleware.use ActionDispatch::Session::CookieStore
end
end
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET']
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']
provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET']
end
......@@ -56,7 +56,7 @@ Rails.application.routes.draw do
end
scope :v1 do
mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks], at: :auth
mount_devise_token_auth_for 'User', at: :auth
end
namespace :v1 do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment