Repository navigation
feat(auth-emulator): Add mock Passkey (WebAuthn) support - #10609
macastelaz merged 7 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces passkey support to the Auth emulator. It adds passkey enrollment and sign-in operations, updates the OpenAPI spec generation scripts, and implements the corresponding backend emulator logic in operations.ts and state.ts. Feedback on the changes suggests improving type safety by avoiding any casts when parsing authenticator responses and avoiding the non-null assertion operator (!) when filtering passkeys to delete.
ec1aa42 to
12e0f15
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10609 +/- ##
=======================================
Coverage ? 57.49%
=======================================
Files ? 603
Lines ? 38534
Branches ? 7755
=======================================
Hits ? 22156
Misses ? 14583
Partials ? 1795 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| }, | ||
| type: "object", | ||
| }, | ||
| emailPrivacyConfig: { |
There was a problem hiding this comment.
This seems new/possibly unrelated to the Passkey support. Just want to double check that it ought to be here.
There was a problem hiding this comment.
Odd - I'm honestly not sure how this snuck in. Thanks for catching it and flagging it. It has been removed in #10636
* feat(auth-emulator): Add mock Passkey (WebAuthn) support * style(auth-emulator): Avoid using 'as any' cast in passkey finalize handlers * fix(auth-emulator): Resolve strict null check errors on blockingFunctions * test(auth-emulator): Add integration tests for passkey (WebAuthn) support * test(auth-emulator): Increase passkey test coverage for edge cases, fallback names, and missing parameters --------- Co-authored-by: Joe Hanley <[email protected]>
* feat(auth-emulator): Add mock Passkey (WebAuthn) support (#10609) * feat(auth-emulator): Add mock Passkey (WebAuthn) support * style(auth-emulator): Avoid using 'as any' cast in passkey finalize handlers * fix(auth-emulator): Resolve strict null check errors on blockingFunctions * test(auth-emulator): Add integration tests for passkey (WebAuthn) support * test(auth-emulator): Increase passkey test coverage for edge cases, fallback names, and missing parameters --------- Co-authored-by: Joe Hanley <[email protected]> * Address PR review comments * Fix TS conversion error by using assertion function for BlockingFunctionsJwtPayload * Trigger CLA check * Do not allow duplicate credentialIds Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * perf(auth-emulator): optimize duplicate credential checks and sign-in lookups --------- Co-authored-by: Joe Hanley <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* feat(auth-emulator): Add mock Passkey (WebAuthn) support (#10609) * feat(auth-emulator): Add mock Passkey (WebAuthn) support * style(auth-emulator): Avoid using 'as any' cast in passkey finalize handlers * fix(auth-emulator): Resolve strict null check errors on blockingFunctions * test(auth-emulator): Add integration tests for passkey (WebAuthn) support * test(auth-emulator): Increase passkey test coverage for edge cases, fallback names, and missing parameters --------- Co-authored-by: Joe Hanley <[email protected]> * Address PR review comments * Fix TS conversion error by using assertion function for BlockingFunctionsJwtPayload * Trigger CLA check * Do not allow duplicate credentialIds Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * perf(auth-emulator): optimize duplicate credential checks and sign-in lookups --------- Co-authored-by: Joe Hanley <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* feat(auth-emulator): Add mock Passkey (WebAuthn) support (#10609) * feat(auth-emulator): Add mock Passkey (WebAuthn) support * style(auth-emulator): Avoid using 'as any' cast in passkey finalize handlers * fix(auth-emulator): Resolve strict null check errors on blockingFunctions * test(auth-emulator): Add integration tests for passkey (WebAuthn) support * test(auth-emulator): Increase passkey test coverage for edge cases, fallback names, and missing parameters --------- Co-authored-by: Joe Hanley <[email protected]> * Address PR review comments * Fix TS conversion error by using assertion function for BlockingFunctionsJwtPayload * Trigger CLA check * Do not allow duplicate credentialIds Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * perf(auth-emulator): optimize duplicate credential checks and sign-in lookups --------- Co-authored-by: Joe Hanley <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
) * feat(auth-emulator): Add mock Passkey (WebAuthn) support (firebase#10609) * feat(auth-emulator): Add mock Passkey (WebAuthn) support * style(auth-emulator): Avoid using 'as any' cast in passkey finalize handlers * fix(auth-emulator): Resolve strict null check errors on blockingFunctions * test(auth-emulator): Add integration tests for passkey (WebAuthn) support * test(auth-emulator): Increase passkey test coverage for edge cases, fallback names, and missing parameters --------- Co-authored-by: Joe Hanley <[email protected]> * Address PR review comments * Fix TS conversion error by using assertion function for BlockingFunctionsJwtPayload * Trigger CLA check * Do not allow duplicate credentialIds Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * perf(auth-emulator): optimize duplicate credential checks and sign-in lookups --------- Co-authored-by: Joe Hanley <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
Add support to the auth emulator for the passkey API surface. Passkey support is currently in "private preview" on a feature branch of the firebase web auth SDK (https://github.com/firebase/firebase-js-sdk/tree/passkey) and we are working towards a beta release which will involve updating the auth quickstart that in turn relies on the auth emulator.
Scenarios Tested
Using a locally modified quickstart version with passkey support pointing at a locally running auth emulator with these changes (https://screenshot.googleplex.com/3EbEZapL5Ax8o8h.png) I manually verified: