使用新的openid登录authlogic创建新用户 [英] Create a new user with new openid login authlogic

查看:93
本文介绍了使用新的openid登录authlogic创建新用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Rails站点中实现了authlogic,并且我正在尝试让openid正常工作.到目前为止,只要您有一个现有帐户,就可以登录,但如果没有,则不能登录.如果identity_url还没有在数据库中,我希望能够自动创建一个新帐户.

I've implemented authlogic in a rails site, and I'm trying to get openid to work correctly. So far, you can login just fine as long as you have an existing account, but not so much if you don't. I'd like to be able to automagically create a new account if the identity_url is not already in the database.

问题是我还需要存储一些其他信息.如果用户是第一次使用他们的openid登录,我想请他们在创建帐户之前填写基本信息(名称,电子邮件).

The problem is that I also need to store some additional info. if the user is logging in for the first time with their openid, I'd like to ask them to fill in basic info (name, email), BEFORE the account is created.

我已经尝试了几种方法,但是似乎没有任何作用.

I've played around with a few methods, but nothing seems to be working.

在此先感谢您的输入!

推荐答案

也许尝试将其他信息放入某种类型的临时表中,并跟踪用户所在的会话.通过身份验证后,连接先前的输入带有OpenID信息的信息以创建真实用户.

Maybe try putting the additional information into a temp table of some kind, and keep track of the session the user is in. Once they have authenticated, connect the previously entered information with the OpenID information to create the real user.

这篇关于使用新的openid登录authlogic创建新用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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