index.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <meta name="google-signin-client_id" content="398214166622-jkme0i3k4tbsgqh19aejaqatrark5l94.apps.googleusercontent.com">
  8. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  9. <title><%= htmlWebpackPlugin.options.title %></title>
  10. <script src="https://apis.google.com/js/platform.js" async defer></script>
  11. </head>
  12. <body>
  13. <noscript>
  14. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  15. </noscript>
  16. <div>
  17. <script>
  18. function onSignIn(googleUser) {
  19. var profile = googleUser.getBasicProfile();
  20. console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
  21. console.log('Full Name: ' + profile.getName());
  22. console.log('Given Name: ' + profile.getGivenName());
  23. console.log('Family Name: ' + profile.getFamilyName());
  24. console.log('Image URL: ' + profile.getImageUrl());
  25. console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
  26. console.log('Id Token: ', googleUser.getAuthResponse().id_token); // Send this to server for identification.
  27. }
  28. function signOut() {
  29. var auth2 = gapi.auth2.getAuthInstance();
  30. auth2.signOut().then(function () {
  31. console.log('User signed out.');
  32. });
  33. }
  34. </script>
  35. </div>
  36. <div id="app"></div>
  37. <!-- built files will be auto injected -->
  38. </body>
  39. </html>