开发者

Authlogic-oid with ONLY OpenID

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 ca开发者_开发问答n pass to acts_as_authentic to make this work?


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


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜