Authlogic auto_register using my options

I have auto-logging working with authlogic using gaizka version of authlogic_openid, which I found on Github, as the original addition of the pelle function seems to be causing problems.

http://github.com/gaizka/authlogic_openid

using authlogic to automatically create users, bypassing explicit user registration

This works well, but when using the auto_register function, it ignores my authlogic settings, such as receiving email from the openid provider ... any ideas what I'm doing wrong?

Here is an example:

http://big-glow-mama.heroku.com/

http://github.com/holden/authlogic_openid_selector_example/tree/with-facebook/

You can see the difference if you register according to the entrance ...

#user.rb class User < ActiveRecord::Base acts_as_authentic do |c| c.validate_login_field = false # optional, but if a user registers by openid, he should at least share his email-address with the app c.validate_email_field = false # fetch email by ax c.openid_required_fields = [:email,"http://axschema.org/contact/email"] #c.required_fields = ["http://axschema.org/contact/email"] # fetch email by sreg #c.optional_fields = ["email"] end #private method to deal with emails goes here end #UserSession.rb class UserSession < Authlogic::Session::Base auto_register logout_on_timeout true end 
+4
source share
2 answers

This works well, but when using the auto_register function, it ignores my authlogic settings, such as receiving email from the openid provider ... any ideas what I'm doing wrong?

The code that handles automatic registration lives in the authlogic_openid Session module. The code that processes the registration (receiving an email provider, etc.) is located in the ActsAsAuthentic module.

The former processes the UserSession object, the latter processes the User object.

I will look in a couple of days to see what can be done to combine both behaviors.

+4
source

All Articles