we are using the following in devise.rb
config.encryptor = :bcrypt
We wanted to change this to
config.encryptor = :authlogic_sha512
Also written code to decrypt old password and hash it to new one when signing in (inside session controller)
However, after updating the password, it gives an error
BCrypt::Errors::InvalidHash (invalid hash):
This error comes at random places if I comment out the original point of the error. So I suppose there is something wrong with either the devise configuration OR with the user.rb model.
The user model has the following line:
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:auth0, :google_oauth2]
Any idea what could be the issue here? thanks in advance.
Aucun commentaire:
Enregistrer un commentaire