-
Notifications
You must be signed in to change notification settings - Fork 3
feat(journey-client): webauthn conditional mediation autofill passkey support … #581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
31044cf
feat(journey-client): conditional mediation autofill passkey support …
vatsalparikh 75c47f4
feat(journey-client): automatic server based mediation and abort cont…
vatsalparikh 72550da
feat(journey-client): automatic server based mediation and abort cont…
nx-cloud[bot] 8d314c6
feat(journey-client): automatic server based mediation and abort cont…
nx-cloud[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| '@forgerock/journey-client': minor | ||
| --- | ||
|
|
||
| Add WebAuthn conditional mediation (passkey autofill) support. | ||
|
|
||
| - `WebAuthn.authenticate(step, signal?)` derives mediation from WebAuthn metadata (`meta.mediation`). | ||
| - When `meta.mediation` is `'conditional'`, an `AbortSignal` is used (caller-provided if present, otherwise created by the SDK). | ||
| - If conditional mediation is requested but not supported, `authenticate()` throws `NotSupportedError` (and the existing error handling sets the hidden outcome to `unsupported`). | ||
| - Adds `WebAuthn.isConditionalMediationSupported()` helper, docs, and unit tests. |
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale in-flight conditional authenticate can submit or error against a newer step.
handleWebAuthnStepreturns{ callbacksRendered: true, didSubmit: false }while theWebAuthn.authenticate(step, 'conditional', controller.signal)promise keeps running in the background. TheAbortControlleris created but never aborted, so if the user submits via a different method (e.g., username/password on the same step) orrenderForm()is invoked again for a new step, the in-flight conditional request can still resolve later and callsubmitForm()on a now-stale step, or callsetError()over the new UI. You should abort the controller when the step changes / form is submitted / component is torn down.Suggested direction
Expose an abort hook (or module-level controller) so
main.tscan cancel the in-flight conditional request before navigating to the next step, and abort it inside thesubmithandler inmain.tsbefore callingjourneyClient.next(...).🤖 Prompt for AI Agents