-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (45 loc) · 1.99 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TOTP Generator</title>
<link rel="icon" type="image/x-icon" href="./assets/img/favicon.png">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="mt-5 mx-auto" style="max-width: 600px;">
<div class="alert alert-primary alert-dismissible fade show" role="alert">
Please enter a secret key and scan the QR on your Authenticator app.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="mb-3">
<h5>Enter Secret</h5>
<input type="text" class="form-control" id="input" placeholder="Your Secret Key here">
</div>
<div class="mb-3 text-center">
<button class="btn btn-primary" onclick="updateKey()">Update</button>
</div>
</div>
<div class="my-3 mx-auto" style="max-width: 600px;">
<div class="mb-3">
<h5>Secret Code</h5>
<p id="key">To be generated</p>
</div>
<div class="mb-3 text-center">
<img src="./assets/img/qr.gif" id="qrCode" style="height: 300px;">
</div>
<div class="mb-3 text-center">
<label class="form-label">Your T-OTP</label>
<h3 id="token" class="text-success">000-000</h3>
<p>Time Remaining: <span id="timeRemaining">23</span></p>
</div>
</div>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="./assets/js/base32.js"></script>
<script src="./assets/js/sha256.js"></script>
<script src="./assets/js/totp.js"></script>
</html>