Passenger, Rails3, Authlogic
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 upd开发者_如何学JAVAated 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 .
I have found a solution. Putting this in an initializer fixes the problem:
class UserSession < Authlogic::Session::Base
allow_http_basic_auth false
end
The first thing I'd recommend:
- 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?
精彩评论