Conversation
nshirley
commented
Sep 4, 2026
| const credentialId = 'Y3JlZC1pZA'; | ||
|
|
||
| // Distinct fills, so a field swapped for another is visible. | ||
| const envelope = { |
Contributor
Author
There was a problem hiding this comment.
This is left as literals rather than importing V1_WIDTHS. It would be the first runtime @fxa/* import in this package (the existing MetricsContext one is type-only), so it needs tsconfig-paths wired into the mocha scripts, and it pulls @fxa/shared/db/mysql/core in via passkey.wrap.repository... That's a lot of weight on a browser-shipped client to share five numbers.
The clean version is extracting the widths to a dependency-free module both sides import, which is bigger than this PR.
vpomerleau
self-requested a review
September 4, 2026 16:41
vpomerleau
reviewed
Sep 4, 2026
Because: - Passwordless sign-in needs the wrap envelope, and no client method reaches the wrap endpoints. - A passkey assertion can now mint a scoped MFA token, which callers need in order to request and spend one. This commit: - Adds createPasskeyWrap and getPasskeyWrap, base64url on the wire and Uint8Array for callers. - Adds the optional scope param to beginPasskeyAuthentication. - Surfaces mfaToken on the authentication result. Closes #FXA-13148
vpomerleau
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
This pull request
createPasskeyWrapandgetPasskeyWrap, both taking anmfa:passkeyJWT.Uint8Arrayin the caller's hands; both codecs iterate one field list so they cannot drift.scopeparam tobeginPasskeyAuthenticationand surfacesmfaTokenon the authentication result.Issue that this pull request solves
Closes: FXA-13148
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Other information (Optional)
/passkey/keysto/passkey/wraps, auth moved fromverifiedSessionTokento themfa:passkeytoken, thepasskeyVerificationProofdesign was dropped, and errno 236 is nowPASSKEY_WRAP_STALErather than a PRF-support error.