문제

I am implementing devise user authentication on a Rails 4 App and was wondering how do I stop the App from logging the User out after a certain amount of time. I want a user not to be signed out unless they click the sign out button, I believe this is called permanent login.

도움이 되었습니까?

해결책

If you look inside config/initializers/devise.rb you will find configuration settings that include config.timeout_in.

It is also possible to set it within the model:

class User < ActiveRecord::Base
  devise :timeoutable, timeout_in: 15.minutes
end

Check this link for more information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top