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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -