How to get user email from google plus oauth

Set your scopes to: https://www.googleapis.com/auth/userinfo.email and https://www.googleapis.com/auth/userinfo.profile And use the endpoint: https://www.googleapis.com/oauth2/v1/userinfo?alt=json Usage: get https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=youraccess_token You will get JSON: { “id”: “xx”, “name”: “xx”, “given_name”: “xx”, “family_name”: “xx”, “link”: “xx”, “picture”: “xx”, “gender”: “xx”, “locale”: “xx” }

Preventing automatic sign-in when using Google+ Sign-In

Update The best supported way to prevent automatic sign-in is to use the API method gapi.auth2.getAuthInstance().signOut() which will prevent automatic sign-in on your site after it has been called. Demo here. In the demo, the user is signed out when they leave the page as shown in the following code: window.onbeforeunload = function(e){ gapi.auth2.getAuthInstance().signOut(); }; … Read more

Retrieving a user’s public google/gmail picture

Is very easy http://picasaweb.google.com/data/entry/api/user/<hereYourUserIdOrYourEmail>?alt=json just has a little problem. You only can get the picture of your Google+ profile, not directly from your gmail. UPDATE: This API is being deprecated and will be turned down in January 2019. Migrate to Google Photos Library API as soon as possible to avoid disruptions to your application. More … Read more

tech