开发者

How to authenticate a user with Google gmail account like stackoverflow

I want to authenticate a开发者_Python百科 user using Google account. I had developed oauth using some libraries.

But it is giving me a message like some website is asking permission to access google docs/calendar/etc.,.

When we are logging into stackoverflow.com it is asking stackoverflow.com is accessing you@gmail.com. How can i get a permission for email address.

Update: I developed oauth using Zend PHP library.

And see the screenshots

stackexchange.com

How to authenticate a user with Google gmail account like stackoverflow

My application screenshot

How to authenticate a user with Google gmail account like stackoverflow

Thank You


At the moment, I'm working on example ZF 1.11 application that uses OpenID and openid-selector. The ZF application, called zfopenid, can be downloaded from here (it contains full ZF library and it should work out of the box):

How to authenticate a user with Google gmail account like stackoverflow

Authentication with google, yahoo works (at least for me) at this stage. To make it work I needed to make some changes in Zend_OpenId_Consumer described at http://framework.zend.com/issues/browse/ZF-6905 + some additional changes. Also I incorporated My_OpenId_Extension_AttributeExchange (i.e. AttributeExchange implementation by Chris Bisnett) to fetch email from google, yahoo (at the moment it is not displayed, but it should be in $_GET variable returned from google, yahoo, aol or myopenid to user/login).

So, if you or anyone would like to test it, I would be grateful as I'm planning to eventually write a blog post about this. Any feedback would be very helpful at this stage. Specifically, whether it really works, or it just works for me (I'm running it on localhost using XAMPP for Linux 1.7.3a and Linux Mint 10).


I did some experiment with ZF to create OPEN ID login form , but i case of google , i was able to sign in but i wasn't able to ask google for the user info

because google is implementing openid extension called AX as i remember , while ZF implement only SREG , you can find it in library/Zend/OpenId/Extension

here is my demo example http://zc.dagho.com/index/login , its working very nice with google and others but it can't ask for users info

and you can take alook to : How to get OpenID user Profile info?

Google implements AX as well as Yahoo (you have to request permission from yahoo). Unfortunately Zend Framework OpenID only supports SREG at the time of this writing but I've written an extension for AX support here as well ak33m.com/?p=71 – Akeem Oct 29 '09 at 2:27

http://framework.zend.com/issues/browse/ZF-6905

update : this might be good , i didn't test it : http://framework.zend.com/issues/browse/ZF-7328


I believe Stackoverflow uses the http://www.dotnetopenauth.net/ library.

https://meta.stackexchange.com/questions/56109/stack-overflow-and-dotnetopenauth


you can authenticate users using google open id as in stackoverflow login.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜