@nymphjs/tilmeld-components 1.0.0-beta.134 → 1.0.0-beta.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/Account.svelte +144 -142
- package/dist/ChangePassword.svelte +63 -61
- package/dist/Login.svelte +13 -2
- package/dist/Recover.svelte +153 -137
- package/dist/RevokeTokens.svelte +31 -29
- package/dist/TwoFactor.svelte +194 -180
- package/package.json +3 -3
- package/src/Account.svelte +144 -142
- package/src/ChangePassword.svelte +63 -61
- package/src/Login.svelte +13 -2
- package/src/Recover.svelte +153 -137
- package/src/RevokeTokens.svelte +31 -29
- package/src/TwoFactor.svelte +194 -180
package/dist/TwoFactor.svelte
CHANGED
|
@@ -20,144 +20,156 @@
|
|
|
20
20
|
<Title id="tilmeld-two-factor-title">{title}</Title>
|
|
21
21
|
{#if hasTOTPSecret === false}
|
|
22
22
|
<Content id="tilmeld-two-factor-content">
|
|
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
|
-
|
|
23
|
+
<form
|
|
24
|
+
onsubmit={preventDefault(
|
|
25
|
+
stopPropagation(() => {
|
|
26
|
+
if (totpSecret == null) {
|
|
27
|
+
beginSetup();
|
|
28
|
+
} else {
|
|
29
|
+
enableTOTP();
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
{#if totpSecret == null}
|
|
35
|
+
<p>
|
|
36
|
+
2 Factor Authentication (2FA) adds an additional layer of
|
|
37
|
+
security. With 2FA, no one can log in without your authenticator
|
|
38
|
+
device, even with your password.
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<p>
|
|
42
|
+
You'll need an authenticator app that supports TOTP codes. Some
|
|
43
|
+
popular apps are linked here.
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<h6 style="margin-top: 0;">Twilio Authy</h6>
|
|
47
|
+
|
|
48
|
+
<ul>
|
|
49
|
+
<li>
|
|
50
|
+
<a
|
|
51
|
+
href="https://play.google.com/store/apps/details?id=com.authy.authy"
|
|
52
|
+
target="_blank"
|
|
53
|
+
rel="noopener noreferrer">Google Play Store</a
|
|
54
|
+
>
|
|
55
|
+
</li>
|
|
56
|
+
<li>
|
|
57
|
+
<a
|
|
58
|
+
href="https://apps.apple.com/us/app/twilio-authy/id494168017"
|
|
59
|
+
target="_blank"
|
|
60
|
+
rel="noopener noreferrer">Apple App Store</a
|
|
61
|
+
>
|
|
62
|
+
</li>
|
|
63
|
+
<li>
|
|
64
|
+
<a
|
|
65
|
+
href="https://authy.com/download/"
|
|
66
|
+
target="_blank"
|
|
67
|
+
rel="noopener noreferrer">Desktop App</a
|
|
68
|
+
>
|
|
69
|
+
</li>
|
|
70
|
+
</ul>
|
|
71
|
+
|
|
72
|
+
<h6 style="margin-top: 0;">Google Authenticator</h6>
|
|
73
|
+
|
|
74
|
+
<ul>
|
|
75
|
+
<li>
|
|
76
|
+
<a
|
|
77
|
+
href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2"
|
|
78
|
+
target="_blank"
|
|
79
|
+
rel="noopener noreferrer">Google Play Store</a
|
|
80
|
+
>
|
|
81
|
+
</li>
|
|
82
|
+
<li>
|
|
83
|
+
<a
|
|
84
|
+
href="https://apps.apple.com/us/app/google-authenticator/id388497605"
|
|
85
|
+
target="_blank"
|
|
86
|
+
rel="noopener noreferrer">Apple App Store</a
|
|
87
|
+
>
|
|
88
|
+
</li>
|
|
89
|
+
</ul>
|
|
90
|
+
|
|
91
|
+
<h6 style="margin-top: 0;">Microsoft Authenticator</h6>
|
|
92
|
+
|
|
93
|
+
<ul>
|
|
94
|
+
<li>
|
|
95
|
+
<a
|
|
96
|
+
href="https://play.google.com/store/apps/details?id=com.azure.authenticator"
|
|
97
|
+
target="_blank"
|
|
98
|
+
rel="noopener noreferrer">Google Play Store</a
|
|
99
|
+
>
|
|
100
|
+
</li>
|
|
101
|
+
<li>
|
|
102
|
+
<a
|
|
103
|
+
href="https://apps.apple.com/us/app/microsoft-authenticator/id983156458"
|
|
104
|
+
target="_blank"
|
|
105
|
+
rel="noopener noreferrer">Apple App Store</a
|
|
106
|
+
>
|
|
107
|
+
</li>
|
|
108
|
+
</ul>
|
|
109
|
+
|
|
110
|
+
<p>
|
|
111
|
+
Once your authenticator app is ready, continue to generate a QR
|
|
112
|
+
code.
|
|
113
|
+
</p>
|
|
114
|
+
{:else}
|
|
115
|
+
<p>Scan this QR code with your authenticator app:</p>
|
|
116
|
+
|
|
117
|
+
<div style="text-align: center;">
|
|
118
|
+
<img alt="TOTP Set Up QR Code" src={totpSecret.qrcode} />
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<p>Or you can enter this code manually into your app:</p>
|
|
122
|
+
|
|
123
|
+
<div style="text-align: center;">
|
|
124
|
+
<code style="word-break: break-all;">{totpSecret.secret}</code>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<p>Enter your password to allow this account change:</p>
|
|
128
|
+
|
|
129
|
+
<div>
|
|
130
|
+
<Textfield
|
|
131
|
+
bind:value={password}
|
|
132
|
+
label="Password"
|
|
133
|
+
type="password"
|
|
134
|
+
style="width: 100%;"
|
|
135
|
+
input$autocomplete="current-password"
|
|
136
|
+
{...prefixFilter(restProps, 'password$')}
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<p>
|
|
141
|
+
Enter a code generated by your app to confirm the account is
|
|
142
|
+
configured correctly:
|
|
143
|
+
</p>
|
|
144
|
+
|
|
145
|
+
<div>
|
|
146
|
+
<Textfield
|
|
147
|
+
bind:value={code}
|
|
148
|
+
label="2FA Code"
|
|
149
|
+
style="width: 100%;"
|
|
150
|
+
input$maxlength={6}
|
|
151
|
+
input$minlength={6}
|
|
152
|
+
{...prefixFilter(restProps, 'code$')}
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
{/if}
|
|
156
|
+
|
|
157
|
+
{#if failureMessage}
|
|
158
|
+
<div class="tilmeld-two-factor-failure">
|
|
159
|
+
{failureMessage}
|
|
160
|
+
</div>
|
|
161
|
+
{/if}
|
|
162
|
+
|
|
163
|
+
{#if loading}
|
|
164
|
+
<div class="tilmeld-two-factor-loading">
|
|
165
|
+
<CircularProgress
|
|
166
|
+
style="height: 24px; width: 24px;"
|
|
167
|
+
indeterminate
|
|
168
|
+
{...prefixFilter(restProps, 'progress$')}
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
171
|
+
{/if}
|
|
172
|
+
</form>
|
|
161
173
|
</Content>
|
|
162
174
|
<Actions>
|
|
163
175
|
<Button disabled={loading} {...prefixFilter(restProps, 'closeButton$')}>
|
|
@@ -183,52 +195,54 @@
|
|
|
183
195
|
</Actions>
|
|
184
196
|
{:else if hasTOTPSecret === true}
|
|
185
197
|
<Content id="tilmeld-two-factor-content">
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<div>
|
|
205
|
-
<Textfield
|
|
206
|
-
bind:value={code}
|
|
207
|
-
label="2FA Code"
|
|
208
|
-
style="width: 100%;"
|
|
209
|
-
input$maxlength={6}
|
|
210
|
-
input$minlength={6}
|
|
211
|
-
{...prefixFilter(restProps, 'code$')}
|
|
212
|
-
/>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
{@render additional?.()}
|
|
216
|
-
|
|
217
|
-
{#if failureMessage}
|
|
218
|
-
<div class="tilmeld-two-factor-failure">
|
|
219
|
-
{failureMessage}
|
|
198
|
+
<form onsubmit={preventDefault(stopPropagation(disableTOTP))}>
|
|
199
|
+
<p>
|
|
200
|
+
2 Factor Authentication (2FA) is enabled on your account. If you'd
|
|
201
|
+
like to disable it, you can provide your password and a code
|
|
202
|
+
generated by your Authenticator app. You can re-enable it by
|
|
203
|
+
generating a new QR code at any time.
|
|
204
|
+
</p>
|
|
205
|
+
|
|
206
|
+
<div>
|
|
207
|
+
<Textfield
|
|
208
|
+
bind:value={password}
|
|
209
|
+
label="Password"
|
|
210
|
+
type="password"
|
|
211
|
+
style="width: 100%;"
|
|
212
|
+
input$autocomplete="current-password"
|
|
213
|
+
{...prefixFilter(restProps, 'password$')}
|
|
214
|
+
/>
|
|
220
215
|
</div>
|
|
221
|
-
{/if}
|
|
222
216
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
{
|
|
217
|
+
<div>
|
|
218
|
+
<Textfield
|
|
219
|
+
bind:value={code}
|
|
220
|
+
label="2FA Code"
|
|
221
|
+
style="width: 100%;"
|
|
222
|
+
input$maxlength={6}
|
|
223
|
+
input$minlength={6}
|
|
224
|
+
{...prefixFilter(restProps, 'code$')}
|
|
229
225
|
/>
|
|
230
226
|
</div>
|
|
231
|
-
|
|
227
|
+
|
|
228
|
+
{@render additional?.()}
|
|
229
|
+
|
|
230
|
+
{#if failureMessage}
|
|
231
|
+
<div class="tilmeld-two-factor-failure">
|
|
232
|
+
{failureMessage}
|
|
233
|
+
</div>
|
|
234
|
+
{/if}
|
|
235
|
+
|
|
236
|
+
{#if loading}
|
|
237
|
+
<div class="tilmeld-two-factor-loading">
|
|
238
|
+
<CircularProgress
|
|
239
|
+
style="height: 24px; width: 24px;"
|
|
240
|
+
indeterminate
|
|
241
|
+
{...prefixFilter(restProps, 'progress$')}
|
|
242
|
+
/>
|
|
243
|
+
</div>
|
|
244
|
+
{/if}
|
|
245
|
+
</form>
|
|
232
246
|
</Content>
|
|
233
247
|
<Actions>
|
|
234
248
|
<Button disabled={loading} {...prefixFilter(restProps, 'closeButton$')}>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymphjs/tilmeld-components",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.136",
|
|
4
4
|
"description": "Nymph.js - Tilmeld Front End Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"license": "Apache-2.0",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@nymphjs/tilmeld-client": "^1.0.0-beta.
|
|
53
|
+
"@nymphjs/tilmeld-client": "^1.0.0-beta.136",
|
|
54
54
|
"@smui/button": "^9.0.2",
|
|
55
55
|
"@smui/checkbox": "^9.0.2",
|
|
56
56
|
"@smui/circular-progress": "^9.0.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"webpack": "^5.109.2",
|
|
73
73
|
"webpack-cli": "^7.2.2"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "968fecb6ad8ad1d560191e58b671057f911133c9"
|
|
76
76
|
}
|