Hello, I am using google Oauth2 for login and I do not throw anything, I put everything as indicated in your documentation but nothing, run by googleUser console and say that (is not defined)
<script>
function onSignIn() {
/*var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
var id_token = googleUser.getAuthResponse().id_token;
console.log('id_token');*/
const googleUser = gapi.auth2.getAuthInstance().currentUser.get();
const profile = googleUser.getBasicProfile();
console.log('Name: ' + profile.getName());
}
the lines commented only because it was tested in that other way please someone who can help me?