Rails Devise, how to unencrypt a password?

前端 未结 4 945
醉梦人生
醉梦人生 2021-01-02 21:28

in rails 3 devise, a user record has an encrypted_password and a password_salt.

How in the console, can I obtain a user\'s password? How to unencrypt?

4条回答
  •  别那么骄傲
    2021-01-02 21:35

    Devise uses BCrypt. You need modify the encrypted_password field in the USERS table and put a new encrypted password.

    You can generate a new encrypted password in this website: http://www.bcrypt-generator.com/

提交回复
热议问题