// auth2 is initialized with gapi.auth2.init() and a user is signed in.
if (auth2.isSignedIn.get()) {
var profile = auth2.currentUser.get().getBasicProfile();
console.log('ID: ' + profile.getId());
console.log('Full Name: ' + profile.getName());
console.log('Given Name: ' + profile.getGivenName());
console.log('Family Name: ' + profile.getFamilyName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail());
}
[null,null,["最后更新时间 (UTC):2024-11-22。"],[[["Google Sign-In library support is deprecated, and migration to FedCM APIs will be mandatory soon, requiring an impact assessment."],["After user sign-in, you can access basic profile information like Google ID, name, profile URL, and email address."],["Instead of Google IDs or profile data, utilize ID tokens for secure backend server authentication."],["Google account email addresses are subject to change, so use the account's ID for user identification on both client and backend."]]],[]]