-
Notifications
You must be signed in to change notification settings - Fork 4
/
auth.html
107 lines (89 loc) · 2.03 KB
/
auth.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tesla Access Token Generator</title>
<style>
body {
background-color: #000;
color: #d0d1d2;
}
button {
background-color: #393c41;
color: #d0d1d2;
padding: 10px 30px;
border-radius: 10px;
transition: background-color 500ms;
}
button:hover {
background-color: #5c5d61;
}
#output {
display: none;
font-family: Verdana, Arial, sans-serif;
font-size: 14px;
white-space: nowrap;
padding-bottom: 20px;
}
#output.fatal-error-message {
position: absolute;
top: 40%;
left: 0;
right: 0;
text-align: center;
font-size: 24px;
}
#output b {
display: inline-block;
width: 150px;
text-align: right;
padding-right: 5px;
}
#output code {
cursor: pointer;
}
#output code:hover {
background-color: #393c41;
}
#output-tokens-primary {
margin-bottom: 50px;
}
#tokens-show-more {
display: block;
margin-top: 10px;
}
#output-tokens-more {
display: none;
}
#confirm-message {
margin-top: 20px;
}
i {
display: block;
margin: 10px 0;
}
</style>
</head>
<body>
<div id="output">
<div id="output-tokens">
<p><i>Click to copy a token</i></p>
<div id="output-tokens-primary">
<div><b>Refresh Token:</b> <code id="refresh-token" data-type="Refresh">(none returned)</code></div>
</div>
<button type="button" id="tokens-show-more">Show access and ID tokens</button>
<div id="output-tokens-more">
<div><i>
You probably don't need these. Make sure that the app you're using is specifically asking for one of
these tokens and not a refresh token.
</i></div>
<div><b>Access Token:</b> <code id="access-token" data-type="Access">(none returned)</code></div>
<div><b>Valid Time:</b> <span id="access-token-validity"></span></div>
<div><b>ID Token:</b> <code id="id-token" data-type="ID">(none returned)</code></div>
</div>
<div id="confirm-message"></div>
</div>
</div>
<script src="js/auth.js"></script>
</body>
</html>