authlogic_openid icon indicating copy to clipboard operation
authlogic_openid copied to clipboard

Exception uninitialized constant OpenIdAuthentication::InvalidOpenId uninitialized

Open DBA opened this issue 15 years ago • 8 comments
trafficstars

On a new project, while trying to setup Authlogic and Authlogic OpenId I constantly run into that exception, which in turn unables me to create users / login users.

I'm using Rails 2.3.5 with the following gems:

config.gem 'authlogic', :version => '2.1.3' config.gem 'rack-openid', :version => '0.2.2', :lib => 'rack/openid' config.gem 'ruby-openid', :version => '2.1.7', :lib => 'openid' config.gem 'authlogic-oid', :version => '1.0.4', :lib => 'authlogic_openid'

I'm also using the latest version of rails/open_id_authentication plugin.

Anyone could provide me with some assistance / guide me in the right direction on how to tackle this problem?

Best regards, DBA

DBA avatar Jan 27 '10 00:01 DBA

"rails/open_id_authentication plugin has been updated a few days ago and it breaks compatibility with the authlogic_openid gem (v=1.0.4)." http://stackoverflow.com/questions/2092694/authlogic-openid-error-uninitialized-constant-openidauthenticationinvalidopeni

sent-hil avatar Feb 02 '10 09:02 sent-hil

Since my original post I've downloaded the gem's source code and tried to fix the problem.

rails/open_id_authentication plugin has been massively updated over the months, without any updates to this gem. At the moment, in my source code, the problem is that in the User.save method I call the class controller's authenticate with open id but never receive the callback with the result.

If I use the rails plugin directly everything works fine and I receive the user's information in the registration hash.

DBA avatar Feb 02 '10 10:02 DBA

After trying to make it work for an hour, I found a old version of plugin and cloned it. It works fine now. Guess that will have to do till Ben updates this gem.

sent-hil avatar Feb 02 '10 10:02 sent-hil

The version it's ment to work with can be found in the gem's test/lib directory, if that's what you're looking for.

I've managed to get past the no callback issue. Apparently, this line was preventing the OpenID callback from happening: options[:return_to] = session_class.controller.url_for(:for_model => "1",:controller=>"users",:action=>"create")

Still wondering what's that :for_model => "1"

DBA avatar Feb 02 '10 11:02 DBA

I would like to know if this problem will be fixed soon or if there's a way to set up my rails application so that it can be easily configured in the environment?

abelta avatar Feb 17 '10 12:02 abelta

Will this be fixed in authlogic-oid or in open_id_authentication?

giggo avatar Mar 02 '10 08:03 giggo

Any news on when it's gonna be fixed? We hacked around it by mixing the new and the old version of the open_id_authentication, but that should not go onto production

glebm avatar Mar 05 '10 06:03 glebm

I resolved that issue with mreinsch/authlogic_openid@9b802c347f5addebcbce945af3b5f80b3ee7b214

mreinsch avatar Mar 17 '10 11:03 mreinsch