Skip to content

feat: add preset support to node SessionProvider#2459

Open
kronosapiens wants to merge 1 commit intomainfrom
kronosapiens/session-provider-sync
Open

feat: add preset support to node SessionProvider#2459
kronosapiens wants to merge 1 commit intomainfrom
kronosapiens/session-provider-sync

Conversation

@kronosapiens
Copy link
Contributor

Bring the node SessionProvider up to date with browser SessionProvider by adding preset-based configuration.

Changes:

  • Optional policies with preset-based resolution via loadConfig()
  • Async preset initialization with _resolvePreset() and _readyPromise pattern
  • Policy subset validation for session cache invalidation (prevents stale sessions when policies change)
  • Support for signupOptions to configure auth method UI
  • Backend type cleanup: explicitly typed guardianKeyGuid, metadataHash, sessionKeyGuid fields

The node provider now has feature parity with the browser provider's 0.13.5+ updates. Related issue: #2458.

Bring the node SessionProvider up to date with browser SessionProvider by adding:
- Optional policies and preset-based configuration
- Async preset resolution via loadConfig()
- Policy subset validation for session cache invalidation
- Support for signupOptions to configure auth method UI
- Proper storage and validation of session policies

Also improve backend type safety by explicitly typing guardianKeyGuid, metadataHash, and sessionKeyGuid fields.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
controller-example-next Building Building Preview Mar 2, 2026 10:09pm
keychain Building Building Preview Mar 2, 2026 10:09pm
keychain-storybook Building Building Preview Mar 2, 2026 10:09pm

Request Review

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.98%. Comparing base (0cc6367) to head (92533f3).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2459      +/-   ##
==========================================
+ Coverage   20.96%   20.98%   +0.02%     
==========================================
  Files         316      319       +3     
  Lines       33550    34609    +1059     
  Branches     1006     1062      +56     
==========================================
+ Hits         7033     7264     +231     
- Misses      26502    27331     +829     
+ Partials       15       14       -1     

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

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.

1 participant