<script>
function onSuccess(googleUser){
let profile = googleUser.getBasicProfile()
console.log('Email: ' + profile.getEmail())
let token = googleUser.getAuthResponse().id_token
console.log('Token: ' + token)
}
function onFailure(error){
console.log(error)
}
function renderButton(){
gapi.signin2.render('my-signin', {
'scope': 'profile email',
'width': 240,
'height': 50,
'longtitle': true,
'theme': 'dark',
'onsuccess': onSuccess,
'onfailure': onFailure
});
}
</script>