Rails devise redirecting to sign in when attempting reset or unlock -



Rails devise redirecting to sign in when attempting reset or unlock -

using

ruby 1.9.3p448 rails 3.2.13 devise (2.2.3)

when user follows link password reset email or unlock business relationship email (devise :recoverable, :lockable) redirected first sign in. have seen in logs, 302.

i have modified

~/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/redirecting.rb

so redirect method has next added top:

file.open("/home/myname/fooblah.txt", 'a'){|f| f.puts(caller()); f.puts "########"}

so see redirect_to beingness called. in caller() chain, no code application calling redirect_to. wondering if there bug or quirk causes redirect.

currently user has go link in email , nail sec time

update

in .rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/devise-2.2.3/app/controllers/devise/unlocks_controller.rb

# /resource/unlock?unlock_token=abcdef def show self.resource = resource_class.unlock_access_by_token(params[:unlock_token]) if resource.errors.empty? set_flash_message :notice, :unlocked if is_navigational_format? respond_with_navigational(resource){ redirect_to after_unlock_path_for(resource) } else respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new } end end protected # path used after unlocking resource def after_unlock_path_for(resource) new_session_path(resource) end

... default redirect root path? devise.yml says:

unlocked: 'your business relationship unlocked. signed in.'

this seems incongruency in devise gem...

i guess have added :authenticate_user! in application controller , have overridden devise's controllers .

if case have add together skip_before_filter :authenticate_user! overridden controllers action

ruby-on-rails-3 devise

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -