#158 new
Marc Love

BCrypt Sessions Not Persisting

Reported by Marc Love | December 14th, 2009 @ 08:49 PM

Changing the crypto_provider to Authlogic::CryptoProviders::BCrypt seems to be breaking the persisting of user sessions.

To replicate, create a copy of the authlogic_example, replace "acts_as_authentic" with:

  acts_as_authentic do |c|
    c.crypto_provider = Authlogic::CryptoProviders::BCrypt
  end

in user.rb and add the bcrypt gem to the initializer block in environment.rb:

  config.gem "bcrypt-ruby", :lib => "bcrypt"

Run the functional tests and you'll get the following failure:

1) Failure: test_should_create_user_session(UserSessionsControllerTest) [/test/functional/user_sessions_controller_test.rb:11]: is not true.

...which traces back to this assertion:

    assert user_session = UserSession.find

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Pages