http://api.chan15.info/google-stackoverflow.html
This is the sample code I use to let user login via Google JavaScript API, and it's work, next step is use user id to login to local server via PHP, but use the user id by JavaScript is pretty danger, the real procedure I want is:
- login user via JavaScript API
- get access_token from JavaScript
- pass the access token to PHP
- use access token to Google OAuth to get user id again by PHP
- login the user by user id
but I don't know how to get access token.