ruby on rails - How to configure Devise to re-authenticate user? -


i'm trying re-authenticate user when session old , he/she checking out order.

when use:

redirect_to "/users/sign_in" 

i get:

filter chain halted :require_no_authentication rendered or redirected 

in console.

is there way configure devise enable re-authentiction of users before critical actions?

thanks help!

in case you're considering re-authenticate user, session timeout. can configure devise use :timeoutable option.

  1. add :timeoutable devise attribute in user model.

  2. modify initialisers/devise.rb: uncomment

    config.timeout_in = 30.minutes 

    you can set session time prefer.

  3. restart server.

cheers!!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -