-1

I'm having trouble with the Authlogic-gem. Before I write my own auth-scheme I wanted to ask if anyone had the same problem:

When logging in it successfully executes the user_session.save and redirects, but the "current_user" is not set. It works perfectly locally, but it won't when using Passenger.

I updated Passenger to 3.0 but no luck.

Am I missing something? This is Rails 3.0.0, Authlogic is 2.1.4 from http://github.com/scrum8/authlogic .

scrrr
  • 5,135
  • 7
  • 42
  • 52

2 Answers2

1

I have found a solution. Putting this in an initializer fixes the problem:

class UserSession < Authlogic::Session::Base
  allow_http_basic_auth false
end
scrrr
  • 5,135
  • 7
  • 42
  • 52
0

The first thing I'd recommend:

  1. The authlogic gem is at 2.1.6 - might be worth bumping your fork to the latest version.

Have you tried setting your sessions to use another method for the data store, i.e. database based?

Sasha
  • 544
  • 7
  • 5
  • Yes I did. But it was something else. Thanks for your answer, I've posted my solution below. – scrrr Nov 01 '10 at 12:51