if (window.plugins)
window.plugins.googleplus.login({
'scopes': 'https://www.googleapis.com/auth/plus.login
https://www.googleapis.com/auth/userinfo.email',
// optional, space-separated list of scopes, If not included or empty, defaults to profile andemail`.
'webClientId': 'myclientid', // optional clientId of your Web application from Credentials settings of your project - On Android, this MUST be included to get an idToken. On iOS, it is not required.
'offline': true,
},
function(user_data) {
// For the purpose of this example I will store user data on local storage
alert('user data');
alert(JSON.stringify(user_data));
},
function(msg) {
alert('error block');
alert(JSON.stringify(msg));
}
);