Skip to content

Instantly share code, notes, and snippets.

@rustemkk
Created February 13, 2019 04:36
Show Gist options
  • Save rustemkk/fec0a25eb6156b5b0358ed7045745a5a to your computer and use it in GitHub Desktop.
Save rustemkk/fec0a25eb6156b5b0358ed7045745a5a to your computer and use it in GitHub Desktop.
simple google sign in button
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id"
content="242027652015-1jjfj1vtp3ftff6o39r3k904ug77ucki.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<div class="g-signin2" data-onsuccess="onSignIn" data-onfailure="onFailure" data-theme="dark"></div>
<script>
function onSignIn(googleUser) {
console.log('onSignIn', googleUser);
}
function onFailure(res) {
console.log('onFail', res);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment