placed code in head and body, when i preview site the cousor turns to a finger like its a link but still not clickable etc
placed in the head
HTML Code:
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="***************************************.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
placed in the body
HTML Code:
<div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
<script>
function onSignIn(googleUser) {
// Useful data for your client-side scripts:
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());
// The ID token you need to pass to your backend:
var id_token = googleUser.getAuthResponse().id_token;
console.log("ID Token: " + id_token);
};
Bookmarks