简体   繁体   中英

How to disable remember_me functionality when using devise?

I want to disable the remember me functionality. So when when a user closes the web-browser , it should force user to login every time using the credentials.

I came across:

config.expire_all_remember_me_on_sign_out = true

in the devise initializer. But I need this functionality when the user closes the browser. Expire all remember_me token when the user closes the webpage. Is there anyway to implement this?

Devise is composed of 10 modules out of which rememberable is one.

To disable it, remove rememberable from the function call to devise in user.rb (I assume you have a user model)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM