How to use the correct Google OpenID url to login to my site?

回眸只為那壹抹淺笑 提交于 2019-12-20 10:33:57

问题


I am trying to implement OpenID as one preferred option to my next web app here

The code is taken from this tutorial and works if I use my openID from myopenid.com

However, I believe most people would just love to use their everyday email address as their openID, as far as I know, Google, Yahoo, and some other big players have already done this in their systems.

My question is: how could I find the correct "url" to enter in the form to login? I used my Google OpenID account for StackOverflow and it works just fine. I try to copy my openID like this:

www.google.com/accounts/o8/id?id=aitoawllano10bzdzp3ht0diffry0qt6_j2ls-m

And paste it directly into my form, but it doesn't work.

I also tried to remove the url parameter, but that won't do, either.

Thanks a lot in advance for any tips and suggestions.


回答1:


Basically, you're not allowed to use a token produced for one site to authenticate to another. This is a security feature. (OK, the site which is allowed to see the OpenID identity could make an assertion accepted by the other site about your identity, but that's out-of-band w.r.t. OpenID.)

The URL you should use is just this:

https://www.google.com/accounts/o8/id


来源:https://stackoverflow.com/questions/2667447/how-to-use-the-correct-google-openid-url-to-login-to-my-site

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