DotNetOpenAuth and Google OpenID implementation

谁说我不能喝 提交于 2019-12-22 08:17:55

问题


It's a relatively well-known fact that Googles' OpenID Provider does not provide (no pun) username and various other properties, as well as that it generates really ugly claimed identifiers.

However, in a recent Hanselminutes episode (at arount 21 minutes into the show) Andrew Arnott says that "Google has special requirements before they'll actually give a name and an email address".

What are these requirements and how can one satisfy Google enough to make it actually return username and email address?


回答1:


You never get the Google username, but you can get the email address and first and last name of the user if your formulate the request right.

Here is the fix I applied to dasBlog so that it would get first and last name plus email address.

Basically you need to send an AX fetch request that "requires" first name, last name, and email address. I should write a blog post on exactly what you need to do in DotNetOpenAuth to accomplish this. Leave a comment on this answer if you think that would be helpful. In the meantime, you can check out the changeset I link to above and see if that gets you going.



来源:https://stackoverflow.com/questions/3725532/dotnetopenauth-and-google-openid-implementation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!