Skip to content

Sdks 4852 RN Fido Package#29

Merged
pingidentity-gaurav merged 15 commits into
mainfrom
SDKS-4852
Apr 15, 2026
Merged

Sdks 4852 RN Fido Package#29
pingidentity-gaurav merged 15 commits into
mainfrom
SDKS-4852

Conversation

@pingidentity-gaurav

@pingidentity-gaurav pingidentity-gaurav commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Adds a new @ping-identity/rn-fido module and introduces explicit FIDO handling within Journey flows.

Reviewer Notes

  • First commit (feat(fido): scaffolding) is scaffolding/setup only; functional behavior lands in the follow-up commit (feat(fido): Fido integration done).
  • Also includes sample app refactor work to de-bloat Journey client panel logic by moving behavior into focused hooks/controllers.

Key Changes

New packages/fido package

  • Android & iOS native bridges (Classic + New Architecture)
  • JavaScript/TypeScript API with types
  • README documentation
  • Unit tests

New Journey-scoped FIDO APIs

  • registerForJourney(...)
  • authenticateForJourney(...)

Journey behavior update

  • FIDO callbacks require explicit handling by the app
  • SDK now signals auto/integration-required callbacks to the app layer
  • FIDO callbacks are indicated, but no longer executed inside Journey callback mutation / journey.next(...)
  • App is responsible for deciding and orchestrating execution

Sample app updates

  • Detects FIDO callbacks
  • Runs FIDO flows explicitly
  • Calls journey.next(...) after FIDO completes

Testing

  • Added/updated integration tests in PingTestRunner
  • Includes FIDO test coverage

Summary by CodeRabbit

  • New Features

    • Adds first-class FIDO/WebAuthn support with a public FIDO client API and Journey integration.
    • Separate Journey and OIDC profile selectors in the sample app UI.
    • Optional Journey debug panel with copyable debug entries.
  • Bug Fixes & Improvements

    • Improved callback handling and FIDO registration/auth flows.
    • Enhanced biometric/credential UX and clearer location permission text.
  • Configuration

    • Sample app rebranded to "RN Sample App" and platform identifiers updated.
    • New env flag: JOURNEY_SHOW_DEBUG_PANEL.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-15 15:47 UTC

Comment thread packages/fido/ios/RNPingFido.mm
Comment thread packages/fido/ios/RNPingFidoCommon.swift Outdated
Comment thread packages/fido/README.md Outdated
Comment thread packages/journey/android/build.gradle Outdated
*/
@JvmStatic
fun configure(reactContext: ReactApplicationContext) {
ContextProvider.init(reactContext.applicationContext)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we need this configure function, when include the Android SDK, the application context will automatically injected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The RN bridge requires explicit ContextProvider.init, the Android SDK's auto-injection via ContentProvider doesn't propagate reliably into the React Native layer.

Comment thread packages/fido/android/src/main/java/com/pingidentity/rnfido/RNPingFidoCommon.kt Outdated
This software may be modified and distributed under the terms
of the MIT license. See the LICENSE file for details.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if empty, can we remove this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, RN library modules need it even when empty, it's a build system requirement on the Android side. Every other package in this repo has the same empty manifest for the same reason. Safe to keep it as-is.

@rodrigoareis rodrigoareis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall changes looks good to me. Left some minor comments.

Comment thread packages/journey/android/build.gradle Outdated
Comment thread PingSampleApp/android/app/journeyapp-debug.jks Outdated
Comment thread PingSampleApp/android/app/pingsampleapp-debug.jks Outdated
Comment thread PingSampleApp/android/app/build.gradle Outdated
Comment thread packages/fido/android/src/main/java/com/pingidentity/rnfido/RNPingFidoCommon.kt Outdated
Comment thread packages/fido/ios/RNPingFidoClassic.mm

@tsdamas tsdamas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rodrigoareis rodrigoareis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: a1cd995f-4999-4df4-8cc2-bc3933faabe9

📥 Commits

Reviewing files that changed from the base of the PR and between f8e055a and 1b29774.

⛔ Files ignored due to path filters (2)
  • .yarn/install-state.gz is excluded by !**/.yarn/**, !**/*.gz
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • PingSampleApp/package.json
  • PingSampleApp/ui/JourneyFullScreen.tsx
  • PingSampleApp/ui/components/atoms/PingTextInput.tsx
  • PingSampleApp/ui/components/molecules/AsyncActionButton.tsx
  • PingSampleApp/ui/journey/components/organisms/JourneyClientPanel.tsx
  • packages/fido/src/NativeRNPingFido.ts
✅ Files skipped from review due to trivial changes (1)
  • PingSampleApp/ui/components/molecules/AsyncActionButton.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • PingSampleApp/package.json
  • PingSampleApp/ui/journey/components/organisms/JourneyClientPanel.tsx
  • packages/fido/src/NativeRNPingFido.ts

📝 Walkthrough

Walkthrough

Adds a new FIDO React Native package with native Android/iOS bridges, tests and docs; integrates FIDO into Journey (new execution modes, async applier, removed auto-polling); refactors sample app to separate Journey/OIDC profiles and new Journey controller hooks; plus many CI, config, and test infra updates.

Changes

Cohort / File(s) Summary
FIDO package (new)
packages/fido/...
New package @ping-identity/rn-fido: TypeScript API, types, native bridges (iOS Classic/TurboModule, Android Classic/TurboModule), Android/iOS implementations and common logic, podspec, build config, Babel/TS/ESLint configs, tests (JS/Android/iOS), README and CI Jest configs.
Journey core & integration
packages/journey/...
Replaced capability model with executionMode/requiresUserInput, added FIDO callback recognition, converted callback applier to async, removed auto-polling behavior, updated exception mapping and many tests to async/concurrency.
Sample app (rn-sample-app)
PingSampleApp/..., PingSampleApp/src/clients.ts
Separated Journey vs OIDC profile selection, added JourneyProvider/OidcProvider wiring and new controller hooks (auto-start, automation, resume, session, debug entries), FIDO client wiring, debug panel UI and renderer updates for FIDO fields.
Journey UI & hooks (sample app)
PingSampleApp/ui/journey/...
New hooks: useJourneyClientPanelController, useJourneyAutomationEffects, useJourneyAutoStartEffect, useJourneyResumeController, useJourneySessionController, useJourneyDebugEntries/effects; panels refactored to controller, updated props and automation flows.
Core & utilities
packages/core/...
Added Android JSON bridge decoding helpers; added iOS PresentationAnchorResolver for ASAuthorization window anchor resolution.
Android/iOS native FIDO implementations
packages/fido/android/..., packages/fido/ios/...
Android: RNPingFidoCommon, Classic & NewArch modules/packages, error codes, Gradle setup, tests. iOS: RNPingFidoCommon/Impl, TurboModule and classic bridge files, tests and podspec entries.
Tests & test-runner
PingTestRunner/..., packages/fido/src/__tests__/*, packages/fido/android/src/test/*, packages/fido/ios/Tests/*
Added integration/unit tests for FIDO JS client, native bridges, Journey orchestration; updated test runner config, mocks, Gradle/iOS test targets and mapping for new package.
Journey mapping & applier updates (iOS/Android)
packages/journey/ios/..., packages/journey/android/...
Mapping logic extended to detect FIDO callbacks (metadata parsing), applier made async/suspending, new MissingIntegrationException, updated exception handling and corresponding tests.
Metro / Jest / CI wiring
metro.config.js, */jest.config.js, .github/workflows/...
Metro watchFolders/extraNodeModules mappings and Jest moduleNameMapper updated for @ping-identity/rn-fido; many workflow YAML files reformatted (indent/whitespace only).
Project config, scripts & packaging
package.json, PingTestRunner/package.json, packages/fido/package.json, lefthook.yml, .gitignore
Workspace renames (rn-sample-app, rn-test-runner), new scripts (test:fido, nuke:metro), added fido workspace deps, lefthook ESLint invocation change, added *.jks ignore.
Sample app platform and signing changes
PingSampleApp/android/..., PingSampleApp/ios/..., PingSampleApp/app.json
Android/iOS package identifiers and display name updated, biometric permission added, iOS entitlements and code signing settings added, Android keystore/password wiring updated.
Styles, UI small changes
PingSampleApp/src/styles/..., PingSampleApp/ui/...
Added debug panel styles (copy button/header), minor UI label/placeholder adjustments for FIDO fields, small formatting/cleanup in other components.
JSON bridge tests & device-profile
packages/core/android/src/test/..., packages/device-profile/...
Added tests verifying RN bridge -> kotlinx.serialization JSON mapping and device-profile JSON bridge behavior.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor App as "JS App"
  participant FidoClient as "FIDO JS Client"
  participant Journey as "Journey Client"
  participant Native as "Native Module"
  participant OS as "Platform Auth"

  App->>FidoClient: createFidoClient(config)
  App->>FidoClient: registerForJourney(journey, options)
  FidoClient->>Journey: journey.getId()
  FidoClient->>Native: registerCredentialForJourney(journeyId, options, config)
  Native->>OS: requestRegistrationWindow(anchor?)
  OS-->>Native: credential/result or error
  Native-->>FidoClient: resolve/reject with mapped result/error
  FidoClient-->>App: promise resolves/rejects
  Note over Journey,FidoClient: on success caller may advance Journey via client.next({})
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

🐰 I found a shiny key beneath the sod,
FIDO gates now hum where journeys plod.
Profiles split like twigs across the trail,
Debug buttons glimmer, logs recount the tale,
We hopped through builds and tests—what a hop and nod! 🥕

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.86378% with 466 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.33%. Comparing base (376b0a5) to head (1b29774).

Files with missing lines Patch % Lines
packages/fido/ios/RNPingFidoCommon.swift 0.00% 252 Missing ⚠️
packages/fido/ios/RNPingFido.mm 0.00% 42 Missing ⚠️
...ney/ios/Callback/JourneyCallbackValueApplier.swift 20.00% 32 Missing ⚠️
packages/fido/ios/RNPingFidoClassic.mm 0.00% 29 Missing ⚠️
packages/fido/ios/RNPingFidoImpl.swift 0.00% 27 Missing ⚠️
.../com/pingidentity/rnjourney/RNPingJourneyCommon.kt 0.00% 25 Missing ⚠️
...es/core/ios/Utils/PresentationAnchorResolver.swift 0.00% 15 Missing ⚠️
.../com/pingidentity/rncore/utils/JsonBridgeMapper.kt 64.51% 3 Missing and 8 partials ⚠️
packages/fido/src/index.tsx 83.67% 8 Missing ⚠️
packages/journey/src/useJourneyForm.ts 55.55% 6 Missing and 2 partials ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #29      +/-   ##
============================================
- Coverage     61.38%   59.33%   -2.06%     
- Complexity       43       71      +28     
============================================
  Files           113      120       +7     
  Lines          9430     9947     +517     
  Branches        408      412       +4     
============================================
+ Hits           5789     5902     +113     
- Misses         3589     3991     +402     
- Partials         52       54       +2     
Flag Coverage Δ
android 10.87% <35.71%> (+2.03%) ⬆️
ios 68.84% <15.98%> (-3.66%) ⬇️
javascript 57.47% <80.39%> (+1.70%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@pingidentity-gaurav pingidentity-gaurav merged commit e2a5d1b into main Apr 15, 2026
21 of 24 checks passed
@pingidentity-gaurav pingidentity-gaurav deleted the SDKS-4852 branch April 15, 2026 15:46
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