0

I would want to implement a user authentication + accesing his/her data in google account. OAuth seems to be the best choice, but openId and google friend connect also seem to confuse me. Here are my requirements :

  1. Ask the user only ONE TIME to grant scope permissions for my app ( as done by facebook apps )

  2. Based on permissions , fetch the user data, and create his/her account for my website. Here I would want to map his UNIQUE GOOGLE ID to UNIQUE MYWEBSITE ID, and store the pair. How can I fetch UNIQUE_GOOGLE_ID ? eg. for facebook it is profile id : so I map 111100xxxx -> MY_WEBSITE_ACCOUNT_ID

What is the numeric unique id for google accounts apart from email ?

  1. When the user logins the second time, he should not be asked for permission, and logged in using his UNIQUE_GOOGLE_ID store in step 2.

Can OAuth do all this, primarily step #1 , asking for permissions only once, unless revoked in google account settings.

4

1 に答える 1

1

oauth は現在、一種の業界標準であり、Facebook の oauth の実装と同様に機能するため、進むべき道です。

http://code.google.com/apis/accounts/docs/OAuth2.html 

特に、「クライアント側 Web アプリケーション用の OAuth 2.0」は、「facebook 接続」に最も近いものになります。

http://code.google.com/apis/accounts/docs/OAuth2.html#CS 

お役に立てれば

于 2011-09-29T15:28:21.003 に答える