как войти в систему с учетной записью google на веб-сайте перенаправить информацию пользователя на следующую страницу - PullRequest
0 голосов
/ 18 июня 2020
<script>
  //  var profile = googleUser.getBasicProfile();

     $('#signinButton').click(function()
     {
        'scope': SCOPE,
        'width': 240,
        'height': 50,
        'longtitle': true,
        'theme': 'dark',
        'onsuccess': onSuccess,
        'onfailure': onFailure

  auth2.grantOfflineAccess().then(signInCallback);
    });

    function onSuccess(googleUser) {
 var profile = googleUser.getBasicProfile();
    console.log("ID: " + profile.getId()); // Don't send this directly to your server!
    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());
    }
</script>
...