Created
June 28, 2020 20:50
-
-
Save rodolfofadino/9bda206da40f63b102a1ae0000ae9f50 to your computer and use it in GitHub Desktop.
Google one tap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="g_id_onload" | |
data-client_id="390285071447-nulpiuehvrjqg91cnah18sj52mlt9c2b.apps.googleusercontent.com" | |
data-callback="handleCredentialResponse"> | |
</div> | |
<script src="https://accounts.google.com/gsi/client" async defer></script> | |
<script src="https://cdn.jsdelivr.net/npm/jwt-decode@2.2.0/build/jwt-decode.min.js"></script> | |
<script> | |
function handleCredentialResponse(response) { | |
var decodedToken = jwt_decode(response.credential); | |
console.log(decodedToken.name); | |
console.log(decodedToken.email); | |
} | |
</script> | |
</body> | |
</html> |
How you verify the token ID from server side ?
Thanks Brother
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Rodolfo . Very-very great solution !