Invalid Ruby on Rails authentication password

I am trying to implement Authlogic. Registration is in order, it enters all the necessary data into my database.

.. but when I try to log in, it gives me an error:

1 error prevented this user session from saving

There were problems with the following fields:

Password is invalid

My password is valid. I'm not sure what is going on. Any ideas?

+3
source share
4 answers

, , Restful authentication. :   40 char - .  , authlogic, , .

class RemovePasswordSaltCap < ActiveRecord::Migration
  def self.up
    change_column :users, :password_salt, :string, :limit => nil
    change_column :users, :crypted_password, :string, :limit => nil
  end
end

.

+4

:

class User < ActiveRecord::Base

  acts_as_authentic do |c|
    c.validate_password_field = false
  end

end

. , , .

valid_password?(attempted_password, check_against_database = check_passwords_against_database?)

+1

, , REST_AUTH_SITE_KEY, .

, :)

0

When upgrading to authlogic, the default value of crypto_provider changed from Sha512to SCrypt, so there may be a case where passwords are broken. Check readme autlogy

0
source

Source: https://habr.com/ru/post/1718517/


All Articles