使用authlogic绕过显式用户注册自动创建用户 [英] using authlogic to auto create users bypassing explicit user registeration

查看:91
本文介绍了使用authlogic绕过显式用户注册自动创建用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用Authlogic自动注册选择使用开放ID的用户.现在,即使他们选择了开放ID,他们也必须先注册才能登录,但是我希望他们可以直接登录,只要我从开放ID提供商处获得所有必要的详细信息即可.但是我不确定该怎么做?

我应该在用户会话控制器中执行此操作还是在模型内部扩展authlogic?

如果有人能指出正确的方向,我将不胜感激.

这是我现在在两页中看到的一个例子:

http://morning-warrior-55.heroku.com/

谢谢

解决方案

Gaizka的版本对我来说效果很好.

http://github.com/gaizka/authlogic_openid

谢谢,这是它正常工作的示例:

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

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

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/

这篇关于使用authlogic绕过显式用户注册自动创建用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆