Created
March 25, 2019 03:31
-
-
Save iskenxan/cd169ae6776539bc6873ebe05d03b88f to your computer and use it in GitHub Desktop.
Gmail addon login page
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> | |
<head> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
<meta name="google-signin-client_id" content="<%= clientId %>"> | |
</head> | |
<body> | |
<div> | |
<div class="g-signin2" data-onsuccess="onSignIn"></div> | |
</div> | |
<script> | |
function onSignIn(googleUser) { | |
var idToken = googleUser.getAuthResponse().id_token; | |
window.location.replace('<%= redirectUri %>?success=1&response_type=<% responseType %>&state=<%= state %>&code=' + idToken); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment