0

这是一个非常奇怪的问题:我已经设置了authlogic_openid_selector_example 应用程序。当我注册时,openid 提供商第一次没有返回电子邮件 ID。但是,如果我删除帐户并重新注册,则会返回电子邮件 ID。我该如何解决这个问题?我在这里托管了我的应用程序版本:http: //pingauthtest.heroku.com/

我查看了我的开发日志,第一次提供商没有返回openid.ext1.value.ext0包含电子邮件 ID 的内容。只有在第一次删除帐户后才会第二次返回。

编辑:一些额外的调试信息:

THIS IS WHEN IT REGISTERS:



  OpenIdAuthentication::Association Load (5.3ms)   SELECT * FROM "open_id_authentication_associations" WHERE ("open_id_authentication_associations"."server_url" = E'https://www.google.com/accounts/o8/ud') 
Generated checkid_setup request to https://www.google.com/accounts/o8/ud with assocication AOQobUde_9BUnQsk91rb_Sf9tguJ-S7Gpkwahc-nvDGDYAC8nphisNqu
Redirected to https://www.google.com/accounts/o8/ud?
openid.assoc_handle=AOQobUde_9BUnQsk91rb_Sf9tguJ-S7Gpkwahc-nvDGDYAC8nphisNqu

&openid.ax.mode=fetch_request
&openid.ax.required=ext0
&openid.ax.type.ext0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail
&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
&openid.mode=checkid_setup
&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
&openid.ns.ax=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0
&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1
&openid.realm=http%3A%2F%2Flocalhost%3A3000%2F
&openid.return_to=http%3A%2F%2Flocalhost%3A3000%2Faccount%3Ffor_model%3D1%26_method%3Dpost%26open_id_complete%3D1
&openid.sreg.required=email
Completed in 3574ms (DB: 14) | 302 Found [http://localhost/account]

THIS IS WHEN IT USES SESSIONS:


 OpenIdAuthentication::Association Load (5.3ms)   SELECT * FROM "open_id_authentication_associations" WHERE ("open_id_authentication_associations"."server_url" = E'https://www.google.com/accounts/o8/ud') 
Generated checkid_setup request to https://www.google.com/accounts/o8/ud with assocication AOQobUde_9BUnQsk91rb_Sf9tguJ-S7Gpkwahc-nvDGDYAC8nphisNqu
Redirected to https://www.google.com/accounts/o8/ud?
openid.assoc_handle=AOQobUde_9BUnQsk91rb_Sf9tguJ-S7Gpkwahc-nvDGDYAC8nphisNqu

&openid.ax.mode=fetch_request
&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
&openid.mode=checkid_setup
&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
&openid.ns.ax=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0
&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1
&openid.realm=http%3A%2F%2Flocalhost%3A3000%2F
&openid.return_to=http%3A%2F%2Flocalhost%3A3000%2Fuser_session%3Ffor_session%3D1%26_method%3Dpost%26open_id_complete%3D1

Completed in 2708ms (DB: 15) | 302 Found [http://localhost/user_session]
4

1 回答 1

0

伟大的!我让它工作!:) 感谢mreinsch的承诺。

Here is the URL, For anyone who wants to have auto-registration enabled: This example app is forked from @holden example app. It does not support the Facebook oid yet. Once the bug is fixed i shall update my repo.

Source: http://github.com/shripadk/authlogic_openid_selector_example/tree/master

Live Example: http://testingauth.heroku.com/

于 2010-05-21T18:26:04.123 回答