Commit 6776df5
authored
feat(mfa): offer passkey enrollment during the login-time MFA setup (#63)
* feat(mfa): offer passkey enrollment during the login-time MFA setup
AuthorizerMFASetup hardcoded passkey: false everywhere it was rendered
with loginContext set (login/signup/OAuth/passkey-primary), and
force-hid the option whenever loginContext was present at all -
because webauthn_registration_options/verify required a bearer token
that doesn't exist until the MFA gate is satisfied. The backend
(authorizerdev/authorizer, authorizerdev/authorizer-js#47) now
supports authenticating that ceremony via the MFA session cookie
instead, so passkey is a real option here.
Also, using the new mfaGate signal on the OAuth/magic-link return
path: route to AuthorizerVerifyOtp for an already-configured factor
instead of always showing the setup screen, and let
AuthorizerPasskeyLogin's verify step render the same challenge form
(previously told the user to sign in with a password instead).
Removed a stale useEffect in AuthorizerVerifyOtp that flagged "Email
or Phone Number is required" on mount even for the legitimate
session-only resolution path these two flows now exercise.
* feat(mfa): passkey login + MFA setup components, shared BackLink
* chore(release): bump authorizer-js to 3.3.0-rc.2; v2.2.0-rc.11 parent c56d058 commit 6776df5
16 files changed
Lines changed: 525 additions & 168 deletions
File tree
- src
- components
- icons
- styles
- utils
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
| |||
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
71 | 95 | | |
72 | 96 | | |
73 | 97 | | |
| |||
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
| 151 | + | |
127 | 152 | | |
128 | 153 | | |
129 | 154 | | |
| |||
204 | 229 | | |
205 | 230 | | |
206 | 231 | | |
207 | | - | |
| 232 | + | |
208 | 233 | | |
209 | 234 | | |
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
| 238 | + | |
213 | 239 | | |
214 | 240 | | |
215 | 241 | | |
| |||
241 | 267 | | |
242 | 268 | | |
243 | 269 | | |
| 270 | + | |
244 | 271 | | |
245 | 272 | | |
246 | 273 | | |
| |||
282 | 309 | | |
283 | 310 | | |
284 | 311 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
307 | 321 | | |
308 | 322 | | |
309 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 21 | | |
32 | 22 | | |
33 | 23 | | |
| |||
76 | 66 | | |
77 | 67 | | |
78 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | | - | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
267 | | - | |
| 271 | + | |
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
272 | | - | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
288 | | - | |
| 291 | + | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
| |||
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
309 | | - | |
| 312 | + | |
310 | 313 | | |
311 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
312 | 335 | | |
313 | 336 | | |
314 | 337 | | |
315 | 338 | | |
316 | 339 | | |
317 | 340 | | |
| 341 | + | |
318 | 342 | | |
319 | 343 | | |
320 | 344 | | |
| |||
339 | 363 | | |
340 | 364 | | |
341 | 365 | | |
342 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
343 | 370 | | |
344 | 371 | | |
345 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
346 | 378 | | |
347 | 379 | | |
348 | 380 | | |
| |||
357 | 389 | | |
358 | 390 | | |
359 | 391 | | |
360 | | - | |
| 392 | + | |
361 | 393 | | |
362 | 394 | | |
363 | 395 | | |
| |||
0 commit comments