From 86e605f26538585bb6c56f6276926aed50c4e828 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 5 Aug 2019 19:51:35 -0600 Subject: [PATCH] WIP: add basic stuff --- public/app.js | 16 ++++++++++++++++ public/index.html | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 public/app.js diff --git a/public/app.js b/public/app.js new file mode 100644 index 0000000..1b341b9 --- /dev/null +++ b/public/app.js @@ -0,0 +1,16 @@ +'use strict'; + +function onSignIn(googleUser) { + var profile = googleUser.getBasicProfile(); + console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead. + console.log('Name: ' + profile.getName()); + console.log('Image URL: ' + profile.getImageUrl()); + console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present. +} + + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } diff --git a/public/index.html b/public/index.html index 95a0344..e0eea93 100644 --- a/public/index.html +++ b/public/index.html @@ -105,3 +105,8 @@ You shouldn't use it for automated testing, because it will change, but it looks } + + +
+Sign out +