-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
181 lines (179 loc) · 5.21 KB
/
Copy pathindex.html
File metadata and controls
181 lines (179 loc) · 5.21 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WebAuthn Demo</title>
<link rel="icon" type="image/png" sizes="32x32" href="./favicon.png" />
<link rel="icon" type="image/png" sizes="48x48" href="./favicon-48px.png" />
<link rel="icon" type="image/png" sizes="64x64" href="./favicon-64px.png" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/path/to/apple-touch-icon-180x180.png"
/>
<script src="./semantic-tabs.js"></script>
<script src="./cbor.js"></script>
<link rel="stylesheet" href="./mvp.css" />
<style>
nav {
margin-bottom: 0.3rem;
}
header {
padding-top: 0;
padding-bottom: 0.3rem;
}
header nav img {
margin: 0;
}
main {
padding-top: 0;
}
form {
width: 100%;
box-sizing: border-box;
}
hr,
footer hr {
margin-top: 1.2rem;
margin-bottom: 1.2rem;
}
footer {
padding: 1rem;
}
pre {
margin: 0;
padding: 0;
}
pre code {
margin: 0;
padding: 0.3rem 1rem 0.3rem 1rem;
}
code {
margin: 0.1rem;
padding: 0rem 0.3rem 0rem 0.3rem;
}
small button {
font-size: 0.75rem;
margin: 0;
padding: 0.2rem;
}
fieldset {
border-style: none;
margin: 0;
padding: 0;
}
fieldset label,
fieldset button {
display: inline-block;
}
a.active {
text-decoration: none;
color: inherit;
}
</style>
</head>
<body>
<header>
<nav>
<a href="https://github.com/BeyondCodeBootcamp/passkeys"
><img alt="Passkeys Demo" src="./pocketid-logo.svg" height="48" />
</a>
<h1>Passkeys Demo</h1>
<ul>
<li>
<a data-href="#main" class="active">Demo</a>
</li>
<li>
<a data-href="#credentials">Credentials</a>
</li>
<li>
<a href="https://beyondcodebootcamp.github.io/presos/passkeys/"
>Presentation</a
>
</li>
<li>
<a href="https://github.com/BeyondCodeBootcamp/passkeys"
>Git Source</a
>
</li>
</ul>
</nav>
</header>
<main>
<section data-semtab="main">
<form id="login-form" onsubmit="PassUI.reg.createOrReplaceKey(event)">
<h2>Select Account</h2>
<label style="display: none"
>Mediation Type:
<small>(Keypass Prompt Style)</small>
<select name="mediation" onchange="PassUI.auth.setMediation(event)">
<option value="conditional" selected>
conditional (Autocomplete Keypass)
</option>
<option value="silent">silent*</option>
<option value="optional">optional (Prompt for Keypass)</option>
<option value="required">required*</option>
</select>
</label>
<label style="display: none"
>Attachment Type:
<small>Computer (or Phone), or Key (or Tag)</small>
<select name="attachment" onchange="PassUI.setAttachment(event)">
<option value="" selected>(allow all)</option>
<option value="platform">platform (computer, phone)</option>
<option value="cross-platform">cross-platform (key, tag)</option>
</select>
</label>
<label data-id="username">
Email / Username:
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete -->
<input
type="text"
id="username"
name="username"
autocomplete="email webauthn"
required
/>
</label>
<button
data-id="authenticate"
type="button"
onclick="PassUI.auth.requestKey(event)"
>
Sign In with Passkey
</button>
<button data-id="register" type="submit">Register New Account</button>
</form>
</section>
<section data-semtab="credentials">
<table>
<thead>
<tr>
<th>User</th>
<th>Secret</th>
<th>Credential</th>
</tr>
</thead>
<tbody data-id="webauthn-credentials"></tbody>
</table>
<template data-tmpl="webauthn-credential">
<tr>
<td style="text-align: left; vertical-align: top" data-name="name">
(no name)
</td>
<td style="text-align: left; vertical-align: top">
<pre><code data-name="secret">(none)</code></pre>
</td>
<td style="text-align: left">
<pre><code data-name="data">(none)</code></pre>
</td>
</tr>
</template>
</section>
</main>
<script type="module" src="./passkey.js"></script>
<script type="module" src="./localstore.js"></script>
<script type="module" src="./app.js"></script>
</body>
</html>