Skip to content

feat(node-client-sdk): adding support for mobile usage#1768

Merged
joker23 merged 1 commit into
mainfrom
skz/sdk-2195/node-client-sdk-next-fdv2-and-mobile-key-hardening
Jun 25, 2026
Merged

feat(node-client-sdk): adding support for mobile usage#1768
joker23 merged 1 commit into
mainfrom
skz/sdk-2195/node-client-sdk-next-fdv2-and-mobile-key-hardening

Conversation

@joker23

@joker23 joker23 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

SDK-2486

This PR will add support for mobile key as a valid credential.

This PR will also harden some typing in the sdk client code.


Note

Medium Risk
Changes which LaunchDarkly hosts and paths the SDK hits when useMobileKey is set; default client-side ID behavior is unchanged, with validation blocking hash + mobile key at startup.

Overview
Adds useMobileKey so the Node client can authenticate with a mobile key instead of a client-side ID. When enabled, NodeClient switches to mobile FDv1 endpoints (mobileFdv1Endpoints), sets credentialType to mobileKey, and uses mobile analytics/diagnostic paths (/mobile, /mobile/events/diagnostic) rather than the credential-in-path client-side URLs.

NodeDataManager drops secure-mode hash in mobile key mode (warns and omits the h= query param) so runtime identify() does not throw if a hash is passed. validateOptions rejects configuring hash and useMobileKey together at construction.

Typing is tightened: custom storage is LDStorage, and NodePlatform takes ValidatedOptions for platform-related fields. Tests mock NodePlatform and assert mobile vs default URL and Authorization header behavior for polling, streaming, diagnostics, and events.

Reviewed by Cursor Bugbot for commit 5c003e7. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@joker23

joker23 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4d9fca3. Configure here.

@joker23 joker23 marked this pull request as ready for review June 23, 2026 21:09
@joker23 joker23 requested a review from a team as a code owner June 23, 2026 21:09

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

fix(node-client-sdk): harden typing in sdk client impl
@joker23 joker23 force-pushed the skz/sdk-2195/node-client-sdk-next-fdv2-and-mobile-key-hardening branch from 4d9fca3 to 5c003e7 Compare June 24, 2026 20:12
@joker23 joker23 merged commit 71d47a7 into main Jun 25, 2026
52 of 53 checks passed
@joker23 joker23 deleted the skz/sdk-2195/node-client-sdk-next-fdv2-and-mobile-key-hardening branch June 25, 2026 16:58
@github-actions github-actions Bot mentioned this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants