mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
get -> match for omniauth callbacks
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
31edd76369
commit
6b04312be5
2 changed files with 2 additions and 1 deletions
|
@ -247,7 +247,7 @@ module ActionDispatch::Routing
|
|||
::OmniAuth.config.path_prefix = path_prefix
|
||||
end
|
||||
|
||||
get "/auth/:action/callback", :action => Regexp.union(mapping.to.omniauth_providers.map(&:to_s)),
|
||||
match "/auth/:action/callback", :action => Regexp.union(mapping.to.omniauth_providers.map(&:to_s)),
|
||||
:to => controllers[:omniauth_callbacks], :as => :omniauth_callback
|
||||
end
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ class DefaultRoutingTest < ActionController::TestCase
|
|||
|
||||
test 'map omniauth callbacks' do
|
||||
assert_recognizes({:controller => 'users/omniauth_callbacks', :action => 'facebook'}, {:path => 'users/auth/facebook/callback', :method => :get})
|
||||
assert_recognizes({:controller => 'users/omniauth_callbacks', :action => 'facebook'}, {:path => 'users/auth/facebook/callback', :method => :post})
|
||||
assert_named_route "/users/auth/facebook/callback", :user_omniauth_callback_path, :facebook
|
||||
|
||||
assert_raise ActionController::RoutingError do
|
||||
|
|
Loading…
Reference in a new issue