简体   繁体   中英

Devise gem to check encrypted password with current password

In my Ruby on Rails application, we are using devise gem Encryptor module to encrypt the password from login page. My user model has encrypted password and does not store password in raw form.

I have password update feature for user and need to check current password. I need to validate with the encrypted password from user model using devise encryptor module which uses bcrypt and klass . How can I achieve it

Devise在模型中提供了有效的密码valid_password?(raw_password_to_check)方法以进行密码检查

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