-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathform.html
50 lines (47 loc) · 1.58 KB
/
form.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/buefy.min.css">
<style>
html {
overflow-y: auto;
}
main.container {
max-width: 400px !important;
text-align: center;
}
</style>
</head>
<body>
<main id="app" class="section container">
<b-tag>Please note: this is a demo. Nothing is stored server side.</b-tag>
<br/>
<br/>
<template v-if="!isAuthenticated">
<b-field>
<b-input name="username" v-model="username" placeholder="Username or E-Mail" @input="checkIsRegistered()" autocomplete="username webauthn"></b-input>
</b-field>
<b-field>
<b-checkbox v-model="isRoaming">Use roaming authenticator</b-checkbox>
</b-field>
<div>
<b-button type="is-primary" @click="register()" :disabled="!username">Register device</b-button>
<b-button type="is-primary" @click="login()" :disabled="!isRegistered">Authenticate</b-button>
</div>
</template>
<template v-if="isAuthenticated">
<p>{{'Hello ' + username + '!'}}</p>
<hr/>
<div>
<b-button type="is-primary" @click="logout()">Sign Out</b-button>
</div>
</template>
</main>
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<script src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script type="module" src="js/demo.js"></script>
</body>
</html>