문제

I am using Rails 4 with Devise. I've been looking for a setting that forces users to change their passwords if it's older than 3 months, but I can't find anything in devise.rb (there are other settings to force changing passwords on first logon, etc.). Any ideas?

도움이 되었습니까?

해결책

Check out the devise_security_extension, it's a devise extension that adds the functionality I think you are looking for.

Once you install it, you can then do

devise :password_expirable

and in your config/initializers/devise.rb, you can add in (or uncommented depending how you installed it) the time frame you want to expire the password

config.expire_password_after = 3.months

Hope this helps!

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