jeudi 18 juin 2020
how to login with google account in website redirect user information to next page
// 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()); }
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire