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