Currently I'm using the Google Sign-In (Legacy) in one of my asp.net apps.
I'm trying to migrate over to the Sign In With Google button since the legacy will be discontinued in 2023.
I can get everything to work except for the below function. I need to grab some profile info for the asp.net app using the new Sign In With Google api.
function onSignIn(googleUser) {
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.
}
any help would be appreciated