Skip to content

Conversation

@williscool
Copy link
Owner

@williscool williscool commented Jan 1, 2026

Note

Introduces HS256 JWT authentication for PowerSync, eliminating static tokens and binding auth to a device ID.

  • Add JWT generation with crypto-js in Connector (generatePowerSyncJWT, HS256 header/kid/aud/exp) and new deviceId helper persisted in AsyncStorage
  • Update Connector.fetchCredentials and network checks to use generated JWTs; export JWT constants for tests
  • Rename env/settings from POWERSYNC_TOKENPOWERSYNC_SECRET; propagate to ConfigObj, SettingsContext, env.ts, and Settings screen validation/UI
  • Documentation: DATA_SYNC_README now details HS256 setup (Audience powersync, KID powersync, base64url secret), troubleshooting notes; .env.example updated
  • Tests: new/updated tests for JWT structure and settings flow (Connector.test.ts, SetupSync tests/mocks)
  • Dependencies: add crypto-js and @types/crypto-js

Written by Cursor Bugbot for commit dc236ee. This will update automatically on new commits. Configure here.

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

Code Coverage Report

Overall Project 20.75%

There is no coverage information present for the Files changed

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

📊 Code Coverage Summary

Coverage Type Coverage
Overall null
Changed Files 100

View detailed coverage report

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

Build artifacts for PR #142 (commit 58b7c01) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@williscool williscool enabled auto-merge (squash) January 1, 2026 06:29
@williscool williscool changed the title feat: powersync hs256 auth feat: powersync hs256 secret auth Jan 1, 2026
@williscool williscool merged commit cb9ca31 into master Jan 1, 2026
11 of 12 checks passed
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

Build artifacts for PR #142 (commit a195d7a) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

📊 Code Coverage Summary

Coverage Type Coverage
Overall 32.1
Changed Files 100

View detailed coverage report

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

📊 Code Coverage Summary

Coverage Type Coverage
Overall 20.75
Changed Files 100

View detailed coverage report

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