android - PHP Google+ Plaform server side user verification and get access token -


i'm using google+ platform on android app plusclient , stuff.

when user signs in can interact php server content, on every request want verify if user says is.

for purpose, on every php request ask id , access token can call "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=$accesstoken" , check if id same on access token.

is valid server-side user auth verification method? if not, best approach?

my other question how access token when connect plusclient send php server? have call googleauthutil.gettoken?

yes, you'll need use googleauthutil.gettoken
that's photohunt android sample app do.
have copy/paste source code https://developers.google.com/+/photohunt/android#authenticating_with_photohunt

saccesstoken = googleauthutil.gettoken(ctx, account, "oauth2:" + scopes.plus_login + " " + scopes.plus_profile); 

hope helps


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -