Skip to content

Conversation

@cerebrl
Copy link
Contributor

@cerebrl cerebrl commented Apr 15, 2025

JIRA Ticket

SDKS-3843

Description

This adds the optional outcome type to the HiddenValueCallback of JSON to provide authenticatorAttachment property.

Did you add a changeset? Yes!

@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2025

🦋 Changeset detected

Latest commit: fc00259

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@forgerock/javascript-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the sdk label Apr 15, 2025
@nx-cloud
Copy link

nx-cloud bot commented Apr 15, 2025

View your CI Pipeline Execution ↗ for commit fc00259.

Command Status Duration Result
nx affected -t build lint test docs e2e-ci --ve... ✅ Succeeded 4m 27s View ↗
nx-cloud record -- nx format:check --verbose ✅ Succeeded 6s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-21 23:25:52 UTC

}

hiddenCallback.setInputValue(
deviceName && deviceName.length > 0 ? `${outcome}::${deviceName}` : outcome,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you will be missing the deviceName from the outcome in the case that the if (metadataCallback) { is true and you send the new format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. Will update now.


if (metadataCallback) {
const meta = metadataCallback.getOutputValue('data') as WebAuthnAuthenticationMetadata;
if (meta?.supportsJsonResponse && credential && 'authenticatorAttachment' in credential) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor I would suggest keys like authenticatorAttachment and data to be used from Constants files as they are re-used across files.

@cerebrl cerebrl force-pushed the feat_webauthn-json-response branch from fe691bd to 9d2ce8c Compare April 15, 2025 19:27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cerebrl cerebrl marked this pull request as ready for review April 21, 2025 22:42
@cerebrl cerebrl force-pushed the feat_webauthn-json-response branch from 9d2ce8c to fc00259 Compare April 21, 2025 23:20
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 72.04969% with 45 lines in your changes missing coverage. Please review.

Project coverage is 58.57%. Comparing base (4557ace) to head (fc00259).

Files with missing lines Patch % Lines
packages/javascript-sdk/src/fr-webauthn/index.ts 0.00% 43 Missing ⚠️
...kages/javascript-sdk/src/fr-webauthn/interfaces.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #537      +/-   ##
===========================================
+ Coverage    58.47%   58.57%   +0.10%     
===========================================
  Files          105      105              
  Lines        25307    25461     +154     
  Branches      1690     1690              
===========================================
+ Hits         14799    14915     +116     
- Misses       10508    10546      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cerebrl cerebrl merged commit 4d7b839 into develop Apr 22, 2025
4 checks passed
@cerebrl cerebrl deleted the feat_webauthn-json-response branch April 22, 2025 02:48
@github-actions github-actions bot mentioned this pull request Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants