diff --git a/config/routes.rb b/config/routes.rb index 9bc4b1f2..17a760a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,6 +5,20 @@ controllers: { omniauth_callbacks: 'spree/omniauth_callbacks' }, path: Spree::SocialConfig[:path_prefix] resources :user_authentications + + devise_scope :user do + match "/users/auth/:provider", + constraints: { provider: /google|facebook/ }, + to: "users/omniauth_callbacks#passthru", + as: :user_omniauth_authorize, + via: [:get, :post] + match "/users/auth/:action/callback", + constraints: { action: /google|facebook/ }, + to: "users/omniauth_callbacks", + as: :user_omniauth_callback, + via: [:get, :post] + end + get 'account' => 'users#show', as: 'user_root'