I've a Rails 4 application with Omniauth Identity and on production I got some of this errors for some users(a few):
BCrypt::Errors::InvalidHash: invalid hash
I've tested all the identity password_digest with the method hash_valid?
BCrypt::Password.valid_hash?(identity.password_digest)
And there are all good.
So I guess the problem come from the password given by the user but I've any idea where and I can't reproduce the error in development.
The form for log in is a basic one:
= form_tag "/auth/identity/callback?origin=#{request.original_url}", class: "simple_form" do
.form-group.string
= text_field_tag :auth_key, nil, class: "string form-control", placeholder: "Email", autofoucs: true
.form-group.password
%div
= password_field_tag :password, nil, placeholder: "Password"
%p= submit_tag "Sign in"
Any Idea, thanks?