views:

227

answers:

2

I am implementing an internal site, for which I want our company's OpenID server to be the only means of registering and logging in. To be more specific, I don't even want a normal email and password/salt to be stored for the users in this site.

I am using authlogic with the authlogic-oid plugin, but I am getting these errors whenever I try to make a new user:

undefined local variable or method `crypted_password_field' for #<User:0xb68b7c00>

I take this to mean that authlogic is trying to generate a password for this user even though there are no password fields in my database. Is there a workaround for this, or config options I can pass to acts_as_authentic to make this work?

A: 

Looks like maybe you're trying access the crypted_password_field property somehow. If you look at the Authlogic example the documentation lists the optional fields (#3). I was able to get Authlogic and RPX up and running without password fields so I know it's possible.

Andy Gaskell
+1  A: 

Figured it out. In your User model, you must specify this config in the acts_as_authentic block:

class User < ActiveRecord::Base
  acts_as_authentic do |c|
    c.crypted_password_field = false
  end
end
Josh Lindsey