forked from NHAS/webauthn-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (48 loc) · 3.08 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
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WebAuthn Demo</title>
<link rel="icon" href="data:,">
<script src="/index.js"></script>
</head>
<body>
<div id="js_loading">
<h1>Loading...</h1>
<p>This page requires JavaScript to function since it's going to do some crypto work.</p>
<p>If you've got JavaScript disabled, you should enable it now.</p>
</div>
<div id="no_webauthn" style="display:none">
<h1>Sorry, no WebAuthN</h1>
<p>Looks like your browser does not support WebAuthN, which is required to do the cryptography work to log in to this website. This is pretty surprising since it's been available for years. You should either update your browser or use a major browser if you want to be able to use this website. We recommend <a href="https://www.mozilla.org/en-US/firefox/">Firefox</a>, but Chrome, Edge, or Safari should work too.</p>
</div>
<div id="no_platform_auth_api" style="display:none">
<h1>Sorry, no isUserVerifyingPlatformAuthenticator API</h1>
<p>Your browser doesn't support the isUserVerifyingPlatformAuthenticator API. This means we can't ask if yo have a user-verifying platform authenticator, which you'll need. This has been available since Chrome/Edge 67, Firefox 60, and Safari 13.</p>
</div>
<div id="no_conditional_mediation_api" style="display:none">
<h1>Sorry, no isConditionalMediationAvailable API</h1>
<p>Your browser doesn't support the isConditionalMediationAvailable API. This means we can't ask if you have conditional mediation available, which you'll need. This has been available since Chrome/Edge 108, Firefox 119, and Safari 16.</p>
</div>
<div id="no_platform_auth" style="display:none">
<h1>Sorry, no UserVerifyingPlatformAuthenticator</h1>
<p>Your browser does not support UserVerifyingPlatformAuthenticator. This is usually something like Touch ID, Face ID, Windows Hello, a fingerprint scanner on Android, or an integrated authenticator like <a href="https://bitwarden.com/help/integrated-authenticator/">Bitwarden</a>. You'll need to configure an authenticator for this browser before you can use this page.</p>
</div>
<div id="no_conditional_mediation" style="display:none">
<h1>Sorry, no UserVerifyingPlatformAuthenticator</h1>
<p>Your browser does not support UserVerifyingPlatformAuthenticator. This is usually something like Touch ID, Face ID, Windows Hello, a fingerprint scanner on Android, or an integrated authenticator like <a href="https://bitwarden.com/help/integrated-authenticator/">Bitwarden</a>. You'll need to configure an authenticator for this browser before you can use this page.</p>
</div>
<form id="login">
<label for="username">Username</label>
<input type="text" name="username" autocomplete="username webauthn" required>
<button type="submit">Next</button>
</form>
<form id="register" style="display:none">
<label for="username">Username</label>
<input type="text" name="username" autocomplete="username webauthn" required>
<label for="username">Display Name</label>
<input type="text" name="displayname" autocomplete="name" required>
<button type="submit">Register</button>
</form>
</body>
</html>