last update on open_id_authentication plugin breaks authlogic_openid #15

Open
jessy opened this Issue Jan 26, 2010 · 14 comments

Comments

Projects
None yet
6 participants

jessy commented Jan 26, 2010

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

Any updates or comments on this?

glebm commented Mar 17, 2010

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.

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

glebm commented Mar 28, 2010

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
:)

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

glebm commented Mar 28, 2010

You are welcome :)

craibuc commented May 12, 2010

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 commented May 14, 2010

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 commented May 18, 2010

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 commented May 19, 2010

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 commented Aug 11, 2010

looks like this is still busted. sadness.

glebm commented Aug 11, 2010

Well, my fork is working

zapnap commented Aug 11, 2010

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

glebm commented Aug 11, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment