开发者

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:

  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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜