binarylogic / authlogic_openid

Extension of the Authlogic library to add OpenID support.
http://authlogic-oid.rubyforge.org
MIT License
167 stars 44 forks source link

[feature] merge registration and login #4

Open rubenfonseca opened 15 years ago

rubenfonseca commented 15 years ago

Hi. It would be very nice if it was possible to merge the login and registration together. Example:

As a user who never used the website. When I login with openid. The user is automatically created.

This way, I don't have a registration phase. The user simple logins, and if it doesn't exist yet on the database, the user is created.

I tried to play with the existing code to implement this behavior with no success. Does it make sense?

rubenfonseca commented 15 years ago

I tried to override "self.find_by_openid_identifier" on the User class as shown in http://gist.github.com/130921 . Although it seems to work, I loose the openid registration fields since map_openid_registration is never called. I think I'm getting closer...

jms301 commented 14 years ago

This appears to have been solved by gaizka. http://github.com/gaizka/authlogic_openid

jms301 commented 14 years ago

Although worth noting that Gaizka has a bug when you have a valid OID provider but invalid directory on their server. Fix for that: http://gist.github.com/272655

glebm commented 14 years ago

Is there a way to do this without modifying authlogic-oid?