Rails + Authlogic + OpenID

Hi,

I've been trying to add a feature to an existing rails app written using rails 2.3.4 and uses Authlogic for authentication to authenticate using openid. I added Authlogic-oid and ruby-openid and tried to get openid to work with both AX and sreg schemas.

I followed many examples online (railscasts). Authentication is done using email originally so login column was dropped.

When used with myopenid.com provider, the registration process is working like a charm, skipping password and storing the values in the tables locally. When used with yahoo or google, an error occurs and i keep getting "Openid identifier had the following error: Sorry, the OpenID server couldn't be found"

My user.rb code looks like the following:

  acts_as_authentic do |config|     config.disable_perishable_token_maintenance = true     config.validate_login_field = false     config.validate_email_field = false     # Google uses AX     config.openid_required_fields = [                                       "http://axschema.org/contact/ email",                                       "http://axschema.org/namePerson/ first",                                       "http://axschema.org/namePerson/ last"                                      ]     # # Other providers use sreg      config.openid_optional_fields = [                                      :email,                                      :nickname                                      ]   end

Also, when checking against yahoo or google, the see the following warning and error logs:

WARNING: making https request to https://open.login.yahooapis.com/openid/op/auth without verifying server certificate; no CA path was specified. [OPENID] Unable to contact OpenID server: Error fetching https://open.login.yahooapis.com/openid/op/auth: You have a nil object when you didn't expect it! The error occurred while evaluating nil.io

That was the registration process.

Now when a successful registration is made and the user tries to log in, the session is not created properly yielding an error of "no credentials"

Is anyone facing a similar problem? Tried to contact Ben of binarylogic, the author of authlogic but received not response.

The aim is to get both openid authentication and local authentication working together smoothly. Now local authentication is working, but openid is not.

try the following: a) gem install ruby-openid-apps-discovery b) Modify config/environment.erb and add this line require 'gapps_openid'

I wrote a blogpost about what I went through to get open-id to work with google: http://toddsedano.blogspot.com/

I'm now in the process of integrating my code with authlogic