Commit 94d303a
feat: support passkey discoverable login (no username required) (#336)
* feat: support passkey discoverable login (no username required)
- Backend: add BeginDiscoverableLogin/FinishDiscoverableLogin flow when
username is empty, resolving user from userHandle in credential response
- Backend: change ResidentKey requirement from Preferred to Required so
new passkeys always support discoverable login
- Frontend: remove username guard on passkey login button, allow empty
username to trigger discoverable flow
- Transport: make startPasskeyLogin username parameter optional
- i18n: remove unused passkeyUsernameRequired key
- Add Playwright E2E test project for local passkey testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve strict mode violation in playwright passkey test
Use .first() for Close button locator when dialog has multiple
matching buttons.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: add passkey discoverable login test screenshot
* revert: remove test screenshot from repo
* refactor: harden discoverable login - nil guard and remove redundant parse
- Add nil check on discoveredUser after FinishDiscoverableLogin
- Reuse credentials parsed in the callback instead of parsing twice
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: awsl23377 <awsl233777@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 143e61c commit 94d303a
File tree
9 files changed
+341
-44
lines changed- internal/handler
- tests/e2e/playwright
- web/src
- lib/transport
- locales
- pages
9 files changed
+341
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
369 | 377 | | |
370 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
371 | 399 | | |
372 | 400 | | |
373 | 401 | | |
| 402 | + | |
374 | 403 | | |
375 | 404 | | |
376 | 405 | | |
| |||
390 | 419 | | |
391 | 420 | | |
392 | 421 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | 422 | | |
400 | 423 | | |
401 | 424 | | |
| |||
448 | 471 | | |
449 | 472 | | |
450 | 473 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
| |||
479 | 483 | | |
480 | 484 | | |
481 | 485 | | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
489 | 555 | | |
490 | 556 | | |
491 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments