-
Notifications
You must be signed in to change notification settings - Fork 1
/
logout.php
56 lines (38 loc) · 1.22 KB
/
logout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
session_destroy();
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta charset = "utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-signin-client_id" content="444425785443-5mh44gn88jrf46t217t7i4m62r4ui1ro.apps.googleusercontent.com">
<!--Enter yout OAuth Client ID in the content attribute -->
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
alert('User signed out.');
document.location.href = 'index.php';
});
}
function onLoad() {
gapi.load('auth2', function() {
gapi.auth2.init();
});
}
signOut();
</script>
<!-- <script src="https://apis.google.com/js/platform.js?onload=onLoad" async defer></script> -->
<?php
header("LOCATION: index.php");
?>
</body>
</html>