I'm wondering how to go about using Authlogic to auto register a user who chooses to use open id. Right now they have to register first before being able to login in, even if they choose open id, but I'd prefer if they could just login directly provided I get all the necessary details from the open id provider. But I'm not sure how to go about doing this?
Would I do it inside my user session controller or is there some fancy way to extend authlogic inside the model?
If someone could point me in the right the direction, i'd be grateful.
Here's an example of what I have now with the two pages:
http://morning-warrior-55.heroku.com/
Thanks,
Gaizka's version seems to work beautifully for me.
http://github.com/gaizka/authlogic_openid
Thanks, here's the example of it working:
http://big-glow-mama.heroku.com/
http://github.com/holden/authlogic_openid_selector_example/tree/with-facebook/
You have to use auto_register
method in your UserSession
model. Although i did try to solve the very same question. I succeeded with first time login/registration only.
Second time when user tries to login, the system tries to register it again.
来源:https://stackoverflow.com/questions/1476953/using-authlogic-to-auto-create-users-bypassing-explicit-user-registeration