mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
omniauth routes fix, see devise issue #600
This commit is contained in:
parent
e30c0f3319
commit
d8f33b8925
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ module Devise
|
|||
class_eval <<-URL_HELPERS, __FILE__, __LINE__ + 1
|
||||
def #{mapping.name}_omniauth_authorize_path(provider)
|
||||
if Devise.omniauth_configs[provider.to_sym]
|
||||
"#{mapping.fullpath}/auth/\#{provider}"
|
||||
"/#{mapping.path}/auth/\#{provider}"
|
||||
else
|
||||
raise ArgumentError, "Could not find omniauth provider \#{provider.inspect}"
|
||||
end
|
||||
|
|
|
@ -239,7 +239,7 @@ module ActionDispatch::Routing
|
|||
end
|
||||
|
||||
def devise_omniauth_callback(mapping, controllers) #:nodoc:
|
||||
path_prefix = "#{mapping.fullpath}/auth"
|
||||
path_prefix = "/#{mapping.path}/auth"
|
||||
|
||||
if ::OmniAuth.config.path_prefix && ::OmniAuth.config.path_prefix != path_prefix
|
||||
warn "[DEVISE] You can only add :omniauthable behavior to one model."
|
||||
|
|
Loading…
Reference in a new issue