Как проверить, вошел ли пользователь в Google? - PullRequest
1 голос
/ 02 ноября 2019

Мне нужен вход в Google для моего сайта. Я уже реализовал кнопку входа в своем файле login.html с помощью документации Google. Все работает нормально с входом и выходом, но как мне обнаружить на других сайтах, что пользователь вошел в систему?

function onSignIn(googleUser) {
    var profile = googleUser.getBasicProfile();
    console.log('ID: ' + profile.getId());
    console.log('Name: ' + profile.getName());
    console.log('Image URL: ' + profile.getImageUrl());
    console.log('Email: ' + profile.getEmail());

}
function signOut() {
  var auth2 = gapi.auth2.getAuthInstance();
  auth2.signOut().then(function () {
    window.location.href='login.html';
    console.log('User signed out.');
  });
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...