-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.js
More file actions
19 lines (19 loc) · 750 Bytes
/
Copy pathstyle.js
File metadata and controls
19 lines (19 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//google sign in
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
$(".g-signin2").css("display","none");
$(".data").css("display","block");
$("#pic").attr('src',profile.getImageUrl());
$("#Name").text(profile.getName());
// 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(){
$(".g-signin2").css("display","block");
$(".data").css("display","none");
});
}