-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebauthn.html
42 lines (36 loc) · 987 Bytes
/
webauthn.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebAuthn only</title>
<script src="webauthn.js"></script>
</head>
<body>
<h1>WebAuthn only</h1>
<a href="/index.html">
<button>back</button>
</a>
<div>
<form id="signupForm">
<h2>Sign-up</h2>
<button type="button" id="register">Sign-up</button>
</form>
<form id="loginForm">
<h2>Login</h2>
<label for="loginInput">Input:</label><br>
<input id="loginInput" autocomplete="webauthn"><br>
<button type="button" id="login">Login</button>
</form>
<div id="status"></div>
</div>
<script>
document.getElementById('register').addEventListener('click', function() {
register("webauthn-only");
});
document.getElementById('login').addEventListener('click', function() {
regularLogin("webauthn-only");
});
</script>
</body>
</html>