1
0
Fork 0
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:
bUg 2010-10-29 20:39:19 +08:00 committed by José Valim
parent e30c0f3319
commit d8f33b8925
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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."