mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
omniauth routes fix, see devise issue #600
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user