last update on open_id_authentication plugin breaks authlogic_openid

#15 · closed · 14 comments

View on GitHub ↗

jessy

Hi, since open_id_authentication is now build on top of Rack::OpenID, the gem is not working anymore. Here the changes i found for now. the exception class OpenIdAuthentication::InvalidOpenId was removed as well as the method OpenIdAuthentification.normalize_identifier These are use in # file lib/authlogic_openid/acts_as_authentic.rb, line 55 ``` def openid_identifier=(value) write_attribute(:openid_identifier, value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value)) reset_persistence_token if openid_identifier_changed? rescue OpenIdAuthentication::InvalidOpenId => e @openid_error = e.message end ``` # File lib/authlogic_openid/session.rb, line 50 ``` def openid_identifier=(value) @openid_identifier = value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value) @openid_error = nil rescue OpenIdAuthentication::InvalidOpenId => e @openid_identifier = nil @openid_error = e.message end ```

Comments

DougPuchalski

Any updates or comments on this?

glebm

I manually included the old version of OpenIdAuthentication in the UserSessions controller. Seems to work for the most part (sort of, and only with the plugin of authlogic-oid, not the gem), but I still haven't quite figured how to make auto_register work.

altenstedt

Any progress being made here? It's a bummer that it's broken like this.

glebm

Yes, mreinsch has fixed the authlogic_openid plugin so that it works with the new openid_authentication: http://github.com/mreinsch/authlogic_openid/tree/master :)

altenstedt

Ah, thanks for a quick reply :) That got me over that particular hurdle.

glebm

You are welcome :)

craibuc

Does this mean that one should use the 'fixed' authlogic_openid plugin rather than the authlogic-oid gem? If so, should the gem be removed?

glebm

Yep. Remove the gem, install the plugin. If you are using postgresql or memcached gem use my version instead of mreinsch (otherwise stick to mreinsch's -- it's more tested)

craibuc

I'm still having difficulty. Would you mind reviewing my 'stack' to see what I'm missing? I started with the authlogic_example application, then tried to add open-id support using the instructions listed on mreinsch's git repository page (http://github.com/mreinsch/authlogic_openid). 1). authlogic_sample application configured and working 2). added migration to add open-id support to User model; ran migration; columns added as expected 3). added open_id_authentication plugin ($ script/plugin install git://github.com/rails/open_id_authentication.git) 4). verified gem installation: authlogic (2.1.3), ruby-open-id (2.1.7), rack-open-id (1.0.3); I removed the authlogic-oid gem, per your instructions; added references to two gems in environment.rb (config.gem "authlogic"; config.gem "ruby-openid", :lib=> "openid") 5). installed the authlogic-oid plugin ($ script/plugin install git://github.com/binarylogic/authlogic_openid.git) 6). made changes to the UsersController and UserSessionsController to use blocks to save each. 7). made changes to new user-sessions view to support open id (f.text_field :openid_identifier) 8). restarted mongrel When I attempt to create a new session using my open id provider, I get an error that occurs in the UserSessionsController that reads: uninitialized constant OpenIdAuthentication::InvalidOpenId thoughts? what am i missing? thanks.

glebm

In 3: should be git://github.com/_glebm_/open_id_authentication.git 4. uninstall ruby-openid, then do script/plugin install git://github.com/glebm/ruby-openid.git

zapnap

looks like this is still busted. sadness.

glebm

Well, my fork is working

zapnap

I'm using the mreinsch fork at the moment. It'd be nice if the official gem merged this in...

glebm

If you don't use memcached gem, mreinsch's fork is better since it has a more elegant solution to the infinite loop problem. The official repo seems to be completely dead.