-
Notifications
You must be signed in to change notification settings - Fork 9
/
logged-in.html
69 lines (60 loc) · 2.32 KB
/
logged-in.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{longappname}}</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
var showDeauth = '{{showdeauthlink}}';
if (showDeauth == 'true')
$('#deauth-gdrive').show();
var countDown = 30;
var v = $('#auth-token').text();
if (v == null || v == '' || v == 'None')
return;
var recheck = function() {
countDown--;
if (countDown > 0) {
$.ajax({
url: '/token-state',
dataType: 'json',
data: {'token': v}
})
.done(function(data) {
if (data.success) {
$('#auto-id').show();
} else {
setTimeout(recheck, 1000);
}
})
.fail(function() {
setTimeout(recheck, 1000);
});
}
};
setTimeout(recheck, 3000);
});
</script>
<div class="jumbotron">
<h1>{{appname}} for {{service}}</h1>
<p>Use these credentials for {{appname}}:</p>
<p><pre id="user-id">{{authid}}</pre></p>
<p id="auto-id" style="display: none">The AuthID has been fetched, you can close this window now.</p>
<p id="auth-token" style="display: none">{{fetchtoken}}</p>
<p id="deauth-gdrive" style="display: none">Visit your <a href="{{deauthlink}}">App Permissions</a> page to de-authorize {{appname}}</p>
</div>
</body>
</html>