views:

93

answers:

1

Authlogic, by itself, seems to be too active record centric for MongoDB (specifically mongomapper) as per: http://github.com/binarylogic/authlogic/issues#issue/15.

However, there's an interesting authlogic plugin for mongo that looks pretty awesome, and simple.

Has anyone used this, or have any experience/recommendations for an authlogic mongodb implementation?

A: 

I went ahead and inplemented it in a spike, changing from restful_authentication to authlogic. The only gotcha I found was needing to add the following code

/app/models/user.rb

class User
  include MongoMapper::Document
  ...

   def self.quoted_table_name
    "users"
  end
end

The quoted_table_name was being requested when creating a new user_session, so I added it and everything was great and happy.

Highly recommend.

UPDATE

Once I started using multiple users, the login features stopped working for me. It would log you in if you use the password of the first user, but nothing else mattered.

I switched to this initializer: https://gist.github.com/444888/e8b28196c4f4452a06b89d566a6a245eae1e9d92, which has been nice. I also recommend looking at Devise, which has this straight out of the box for mongomapper.

Jesse Wolgamott