Skip to content

Conversation

@ancheetah
Copy link
Collaborator

@ancheetah ancheetah commented Dec 9, 2025

JIRA Ticket

https://pingidentity.atlassian.net/browse/SDKS-4522

Description

Adds virtual authenticator tests for DaVinci client FIDO collectors and FIDO module.

Included changeset for improved error handling

Summary by CodeRabbit

  • New Features

    • UI now includes FIDO actions ("FIDO Register" / "FIDO Authenticate") and WebAuthn support in the demo flow.
  • Bug Fixes

    • Improved FIDO error handling when registration or authentication options are missing.
  • Tests

    • Added end-to-end WebAuthn/FIDO2 tests (one scenario currently skipped); test runner configured to ignore matching FIDO tests during some runs.
  • Chores

    • Added a changeset indicating a patch version bump.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

🦋 Changeset detected

Latest commit: 7834cde

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

This PR includes changesets to release 11 packages
Name Type
@forgerock/davinci-client Patch
@forgerock/journey-client Patch
@forgerock/oidc-client Patch
@forgerock/protect Patch
@forgerock/sdk-types Patch
@forgerock/sdk-utilities Patch
@forgerock/iframe-manager Patch
@forgerock/sdk-logger Patch
@forgerock/sdk-oidc Patch
@forgerock/sdk-request-middleware Patch
@forgerock/storage Patch

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 9, 2025

Walkthrough

Adds FIDO/WebAuthn support: a UI component for registration/authentication, wiring into the main app, E2E tests using a Chrome CDP fake authenticator (with tests ignored by default), a changeset for a patch bump, and early-exit validation in FIDO client methods when no options are provided.

Changes

Cohort / File(s) Summary
Changeset versioning
\.changeset/full-bikes-boil.md
Patch bump for @forgerock/davinci-client noting improved FIDO module error handling when no options.
FIDO core library
packages/davinci-client/src/lib/fido/fido.ts
Added early-exit validation in register() and authenticate() to return a GenericError (fido_error) when options are falsy.
E2E FIDO component
e2e/davinci-app/components/fido.ts
New fidoComponent() that injects a button per collector and orchestrates register/authenticate calls, updater invocation, error logging, and conditional submitForm() on successful update.
E2E app integration
e2e/davinci-app/main.ts
Imported and wired fidoComponent; renamed protect API variable to protectApi and updated calls to protectApi.getData() / protectApi.start(); renderForm invokes fidoComponent for FIDO collectors.
E2E tests & config
e2e/davinci-suites/playwright.config.ts, e2e/davinci-suites/src/fido.test.ts
Playwright config adds testIgnore: '**/fido.test.ts'. Added fido.test.ts implementing Chrome CDP WebAuthn fake authenticator setup, credential registration/enumeration, authentication flow, and assertions (one usernameless test skipped).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Form
    participant FidoComponent
    participant FidoAPI
    participant Updater
    participant Server

    Note over FidoComponent: FIDO Registration Flow
    User->>Form: Click "FIDO Register"
    Form->>FidoComponent: Button event
    FidoComponent->>FidoAPI: register(publicKeyCredentialCreationOptions)
    FidoAPI-->>FidoComponent: credential / error
    alt Registration Success
        FidoComponent->>Updater: updater(credential, collector)
        Updater->>Server: send credential
        alt Updater Success
            Server-->>Updater: accepted
            Updater-->>FidoComponent: success
            FidoComponent->>Form: submitForm()
        else Updater Error
            Updater-->>FidoComponent: error (logged)
        end
    else Registration Error
        FidoComponent->>FidoComponent: log error (halt)
    end
Loading
sequenceDiagram
    participant User
    participant Form
    participant FidoComponent
    participant FidoAPI
    participant Updater
    participant Server

    Note over FidoComponent: FIDO Authentication Flow
    User->>Form: Click "FIDO Authenticate"
    Form->>FidoComponent: Button event
    FidoComponent->>FidoAPI: authenticate(publicKeyCredentialRequestOptions)
    FidoAPI-->>FidoComponent: assertion / error
    alt Authentication Success
        FidoComponent->>Updater: updater(assertion, collector)
        Updater->>Server: send assertion
        alt Updater Success
            Server-->>Updater: verified
            Updater-->>FidoComponent: success
            FidoComponent->>Form: submitForm()
        else Updater Error
            Updater-->>FidoComponent: error (logged)
        end
    else Authentication Error
        FidoComponent->>FidoComponent: log error (halt)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect packages/davinci-client/src/lib/fido/fido.ts for early-exit error construction and consistency with GenericError shape.
  • Review e2e/davinci-app/components/fido.ts for correct WebAuthn option extraction, fidoApi usage, updater invocation, and error paths.
  • Verify e2e/davinci-app/main.ts wiring and collector handling.
  • Skim e2e/davinci-suites/src/fido.test.ts for CDP WebAuthn setup, virtual authenticator lifecycle, and test robustness.

Possibly related PRs

Suggested reviewers

  • ryanbas21
  • cerebrl

Poem

🐇 I nibble keys and spin a tale,

Buttons blink and tests set sail,
WebAuthn hops from code to air,
Credentials made with careful care,
Errors trapped — the meadow's fair.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The PR description includes the required JIRA ticket link and a brief description of changes, though it contains a discrepancy with the actual changeset file included. Clarify whether a changeset is required. The PR description states 'No changeset is needed,' but the changes include a new changeset file (.changeset/full-bikes-boil.md) for improved FIDO error handling.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding virtual authenticator end-to-end tests for the davinci-client. It is clear, concise, and directly reflects the primary objective of the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SDKS-4522-virtual-auth-e2e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 9, 2025

View your CI Pipeline Execution ↗ for commit faa2963

Command Status Duration Result
nx affected -t build lint test e2e-ci ❌ Failed 1m 54s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-10 00:00:02 UTC

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a possible root cause for your failed CI:

Our new FIDO WebAuthn E2E test is failing due to a DNS resolution error (net::ERR_NAME_NOT_RESOLVED) for the external test domain "aj-test.pi.scrd.run:5829". The test code is properly structured, but the external test environment is currently unreachable, which requires infrastructure recovery before the test can execute successfully.

No code changes were suggested for this issue.

If the issue was transient, you can trigger a rerun:

Rerun CI

Nx Cloud View detailed reasoning on Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

test('Register and authenticate with webauthn device', async ({ page }) => {
const { navigate } = asyncEvents(page);

await navigate('https://aj-test.pi.scrd.run:5829/?acr_values=ccff5c09002042bd86104da45cd7102e');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we going to need a fully secured domain even for virtual authenticators?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You do not on Chrome. You do on Firefox though I believe, but these will only work on Chromium.

Comment on lines 53 to 55
await page.getByRole('button', { name: 'DEVICE_REGISTRATION' }).click();
await page.getByRole('button', { name: 'Biometrics/Security Key' }).click();
await page.getByRole('button', { name: 'FIDO Register' }).click();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this just a highly complex tree you're currently using for testing? I'm asking because of all the button clicks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it's very similar to the flow for phone number registration test. The last button isn't really necessary, it can be an automatic registration/authentication, but I added it anyways to trigger when you want to start FIDO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it. The extra button click is okay. I just get nervous when big, complex flows/journeys are used in testing :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know if we are going to have the same issue with DaVinci as we did with AM? The too many credentials issue, that is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Responded to this via slack, but for posterity

Technically yes to Justin's question, but our solution we discussed was to not include these tests as part of our ci directly and to use the playwright grep configuration so we can run virtual Authenticator tests manually
Like playwright test —grep “*.webauthn” and playwright only picks up those file types and we can alias it into a command
This circumvents the idea of ci failing consistently
We of course eventually could hit the error because it's a browser restriction and we would have to change the user or delete the devices but the tests themselves can hold value and not run all the time until we have a better way to delete devices automatically

await expect(credentialsAfterAuth.credentials).toHaveLength(1);

// Signature counter should have incremented after successful authentication/assertion
await expect(credentialsAfterAuth.credentials[0].signCount).toBeGreaterThan(initialSignCount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

So this is verifying that from an SDK perspective, the authentication actually worked, and the credential was signed?

I'm not totally against it, but it feels a bit low-level.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I wasn't sure what you were going for with WebAuthn.setUserVerified. From my understanding this just sets UV to always succeed so I wanted some other way to test that authentication actually happened with the SDK.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So if User Verification is required by the node, we would need UV to work on the authenticator. if it's not required, the setting probably is more no-op because there is no user verification requirement. So depends on the UV requirement

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this approach. The dangers about using mock things is you can accidentally assert something that will always be true because it is mocked. One of the most important parts of testing is that what you assert is actually fail'able.

@ancheetah ancheetah force-pushed the SDKS-4522-virtual-auth-e2e branch from faa2963 to 6fed17f Compare December 17, 2025 00:47
@ancheetah ancheetah marked this pull request as ready for review December 17, 2025 00:48
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af4bf4c and 6fed17f.

📒 Files selected for processing (6)
  • .changeset/full-bikes-boil.md (1 hunks)
  • e2e/davinci-app/components/fido.ts (1 hunks)
  • e2e/davinci-app/main.ts (5 hunks)
  • e2e/davinci-suites/playwright.config.ts (1 hunks)
  • e2e/davinci-suites/src/fido.test.ts (1 hunks)
  • packages/davinci-client/src/lib/fido/fido.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ancheetah
Repo: ForgeRock/ping-javascript-sdk PR: 468
File: packages/davinci-client/src/lib/fido/fido.utils.ts:17-24
Timestamp: 2025-11-07T21:35:14.799Z
Learning: DaVinci FIDO API accepts standard base64 encoding (RFC 4648 §4 with `+`, `/`, `=`) for WebAuthn response fields (rawId, clientDataJSON, authenticatorData, signature, userHandle) in packages/davinci-client, not base64url. This is confirmed by sample payloads from the DaVinci team showing standard base64 format.
🧬 Code graph analysis (3)
e2e/davinci-app/components/fido.ts (1)
packages/davinci-client/src/lib/node.slice.ts (1)
  • error (72-110)
packages/davinci-client/src/lib/fido/fido.ts (1)
packages/sdk-types/src/lib/error.types.ts (1)
  • GenericError (7-24)
e2e/davinci-app/main.ts (2)
packages/protect/src/lib/protect.ts (1)
  • protect (30-96)
packages/davinci-client/src/index.ts (1)
  • fido (10-10)
🪛 ast-grep (0.40.0)
e2e/davinci-app/components/fido.ts

[warning] 24-24: Direct HTML content assignment detected. Modifying innerHTML, outerHTML, or using document.write with unsanitized content can lead to XSS vulnerabilities. Use secure alternatives like textContent or sanitize HTML with libraries like DOMPurify.
Context: button.innerHTML = 'FIDO Register'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://www.dhairyashah.dev/posts/why-innerhtml-is-a-bad-idea-and-how-to-avoid-it/
- https://cwe.mitre.org/data/definitions/79.html

(unsafe-html-content-assignment)


[warning] 46-46: Direct HTML content assignment detected. Modifying innerHTML, outerHTML, or using document.write with unsanitized content can lead to XSS vulnerabilities. Use secure alternatives like textContent or sanitize HTML with libraries like DOMPurify.
Context: button.innerHTML = 'FIDO Authenticate'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://www.dhairyashah.dev/posts/why-innerhtml-is-a-bad-idea-and-how-to-avoid-it/
- https://cwe.mitre.org/data/definitions/79.html

(unsafe-html-content-assignment)


[warning] 24-24: Direct modification of innerHTML or outerHTML properties detected. Modifying these properties with unsanitized user input can lead to XSS vulnerabilities. Use safe alternatives or sanitize content first.
Context: button.innerHTML = 'FIDO Register'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://owasp.org/www-community/xss-filter-evasion-cheatsheet
- https://cwe.mitre.org/data/definitions/79.html

(dom-content-modification)


[warning] 46-46: Direct modification of innerHTML or outerHTML properties detected. Modifying these properties with unsanitized user input can lead to XSS vulnerabilities. Use safe alternatives or sanitize content first.
Context: button.innerHTML = 'FIDO Authenticate'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://owasp.org/www-community/xss-filter-evasion-cheatsheet
- https://cwe.mitre.org/data/definitions/79.html

(dom-content-modification)

🔇 Additional comments (13)
.changeset/full-bikes-boil.md (1)

1-5: LGTM!

The changeset correctly documents the patch version bump for improved FIDO module error handling.

packages/davinci-client/src/lib/fido/fido.ts (2)

58-64: LGTM! Good defensive validation.

The early-exit validation properly handles the case when registration options are missing, preventing downstream errors in the transformation pipeline.


119-125: LGTM! Consistent error handling.

The authentication validation mirrors the registration pattern and provides clear error messaging when options are unavailable.

e2e/davinci-suites/playwright.config.ts (1)

44-44: LGTM! Aligns with team's testing strategy.

Excluding FIDO tests from standard runs prevents CI failures due to browser credential limits, as discussed in past comments. These tests can still be executed manually when needed.

e2e/davinci-suites/src/fido.test.ts (3)

11-27: LGTM! Proper virtual authenticator setup.

The beforeEach hook correctly configures a platform authenticator with UV+RK for passkey testing, and the CDP session setup is appropriate for Chromium-based testing.


72-84: Excellent verification approach.

Using signCount to verify that authentication actually occurred is a robust testing strategy that ensures the WebAuthn flow is working correctly, not just mocked.


90-143: LGTM! Good coverage of usernameless flow.

The second test properly exercises the usernameless authentication scenario, providing comprehensive coverage of FIDO authentication patterns.

e2e/davinci-app/main.ts (3)

10-10: LGTM! Clean FIDO integration.

The imports and initialization of the FIDO API are properly structured and follow the existing patterns in the application.

Also applies to: 34-34, 86-86


85-85: LGTM! Consistent naming improvement.

Renaming to protectApi improves consistency across the codebase.

Also applies to: 92-92, 294-294


256-266: LGTM! Proper FIDO collector handling.

The rendering logic for FIDO collectors correctly passes the fidoApi instance and submitForm callback, mirroring the patterns used for other collector types.

e2e/davinci-app/components/fido.ts (3)

21-42: LGTM! Clear registration flow.

The registration flow properly orchestrates the WebAuthn API call, handles both success and error cases, and integrates with the updater/submitForm pattern.


43-64: LGTM! Consistent authentication flow.

The authentication flow mirrors the registration pattern, maintaining consistency across the component.


24-24: Static analysis false positive - safe innerHTML usage.

The static analysis warnings about innerHTML usage on lines 24 and 46 are false positives. Both assignments use hardcoded string literals ('FIDO Register' and 'FIDO Authenticate') with no dynamic content, posing no XSS risk. Using textContent would be semantically equivalent here but not necessary for security.

Also applies to: 46-46

@ancheetah ancheetah force-pushed the SDKS-4522-virtual-auth-e2e branch from 6fed17f to f674545 Compare December 17, 2025 01:04
const davinciClient: DavinciClient = await davinci({ config, logger, requestMiddleware });
const protectAPI = protect({ envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447' });
const protectApi = protect({ envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447' });
const fidoApi = fido();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does anything other than the fido.js component use this API? If no, could we just move this into the component, rather than initializing it here to just pass it into the component?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, moved it there


// Initialize Protect
const error = await protectAPI.start();
const error = await protectApi.start();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for finding these ❤️

Comment on lines +58 to +65
if (!options) {
return {
error: 'registration_error',
message: 'FIDO registration failed: No options available',
type: 'fido_error',
} as GenericError;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! It's good we caught this during our testing phase.

@ancheetah ancheetah force-pushed the SDKS-4522-virtual-auth-e2e branch from f674545 to 7834cde Compare December 17, 2025 18:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
e2e/davinci-app/components/fido.ts (1)

24-24: Static analysis false positives for hardcoded strings.

The static analysis warnings about innerHTML usage are false positives here since both assignments use hardcoded string literals ('FIDO Register' and 'FIDO Authenticate'), not user input. However, as an optional refinement, you could use textContent instead of innerHTML for simple text assignments to follow best practices.

If you'd like to make this change:

-    button.innerHTML = 'FIDO Register';
+    button.textContent = 'FIDO Register';

And:

-    button.innerHTML = 'FIDO Authenticate';
+    button.textContent = 'FIDO Authenticate';

Also applies to: 46-46

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f674545 and 7834cde.

📒 Files selected for processing (5)
  • .changeset/full-bikes-boil.md (1 hunks)
  • e2e/davinci-app/components/fido.ts (1 hunks)
  • e2e/davinci-app/main.ts (4 hunks)
  • e2e/davinci-suites/src/fido.test.ts (1 hunks)
  • packages/davinci-client/src/lib/fido/fido.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/davinci-client/src/lib/fido/fido.ts
🧰 Additional context used
🧬 Code graph analysis (2)
e2e/davinci-app/main.ts (2)
packages/protect/src/lib/protect.ts (1)
  • protect (30-96)
e2e/davinci-app/components/fido.ts (1)
  • fidoComponent (14-66)
e2e/davinci-app/components/fido.ts (2)
packages/davinci-client/src/lib/fido/fido.ts (1)
  • fido (50-173)
packages/davinci-client/src/lib/node.slice.ts (1)
  • error (72-110)
🪛 ast-grep (0.40.0)
e2e/davinci-app/components/fido.ts

[warning] 24-24: Direct modification of innerHTML or outerHTML properties detected. Modifying these properties with unsanitized user input can lead to XSS vulnerabilities. Use safe alternatives or sanitize content first.
Context: button.innerHTML = 'FIDO Register'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://owasp.org/www-community/xss-filter-evasion-cheatsheet
- https://cwe.mitre.org/data/definitions/79.html

(dom-content-modification)


[warning] 46-46: Direct modification of innerHTML or outerHTML properties detected. Modifying these properties with unsanitized user input can lead to XSS vulnerabilities. Use safe alternatives or sanitize content first.
Context: button.innerHTML = 'FIDO Authenticate'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://owasp.org/www-community/xss-filter-evasion-cheatsheet
- https://cwe.mitre.org/data/definitions/79.html

(dom-content-modification)


[warning] 24-24: Direct HTML content assignment detected. Modifying innerHTML, outerHTML, or using document.write with unsanitized content can lead to XSS vulnerabilities. Use secure alternatives like textContent or sanitize HTML with libraries like DOMPurify.
Context: button.innerHTML = 'FIDO Register'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://www.dhairyashah.dev/posts/why-innerhtml-is-a-bad-idea-and-how-to-avoid-it/
- https://cwe.mitre.org/data/definitions/79.html

(unsafe-html-content-assignment)


[warning] 46-46: Direct HTML content assignment detected. Modifying innerHTML, outerHTML, or using document.write with unsanitized content can lead to XSS vulnerabilities. Use secure alternatives like textContent or sanitize HTML with libraries like DOMPurify.
Context: button.innerHTML = 'FIDO Authenticate'
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://www.dhairyashah.dev/posts/why-innerhtml-is-a-bad-idea-and-how-to-avoid-it/
- https://cwe.mitre.org/data/definitions/79.html

(unsafe-html-content-assignment)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: pr
  • GitHub Check: Mend Code Security Check
🔇 Additional comments (9)
.changeset/full-bikes-boil.md (1)

1-5: LGTM!

The changeset correctly documents the FIDO error handling improvement with an appropriate patch-level version bump.

e2e/davinci-app/main.ts (3)

34-34: LGTM!

The import of fidoComponent and the consistent renaming from protectAPI to protectApi improve code consistency and readability.

Also applies to: 85-85, 91-91


255-264: LGTM!

The FIDO collector handling follows the established pattern used for other collectors in the application, maintaining consistency in the codebase.


292-292: LGTM!

Consistent with the protectAPI to protectApi rename throughout the file.

e2e/davinci-suites/src/fido.test.ts (3)

1-32: LGTM!

The test setup properly configures a Chrome CDP virtual authenticator with appropriate settings for passkey testing (platform authenticator with UV and RK support). The beforeEach/afterEach hooks ensure proper test isolation.


35-88: LGTM!

The test comprehensively validates the FIDO registration and authentication flow. The verification of signature counter increments after authentication is a particularly good assertion that confirms actual cryptographic operations occurred rather than just mocked behavior.


90-145: LGTM!

Appropriately skipped with a clear explanation of the upstream DaVinci issue. The test structure is preserved for future enablement once the authentication options issue is resolved.

e2e/davinci-app/components/fido.ts (2)

20-42: LGTM!

The registration flow is well-structured with proper error handling. The component correctly retrieves credential options, calls the FIDO API, handles both API and updater errors, and only proceeds with form submission on success.


43-65: LGTM!

The authentication flow mirrors the registration flow with consistent error handling and form submission logic. The implementation maintains good symmetry between the two FIDO operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants