Skip to content

Conversation

@rkistner
Copy link
Contributor

This adds a new supabase_jwt_secret config option. This can be set to the same value as the deprecated app.settings.jwt_secret value, without any additional config.

Specifically, this does:

  1. Avoid needing boilerplate for key type and alg.
  2. Avoid needing to specify the audience "authenticated".
  3. Increase the max key lifetime to match Supabase (1 week),
  4. Automatically base64-url-encode the key.

The idea is this would allow just copying the Supabase JWT key from the Supabase project dashboard, without any more complications.

As soon as Supabase rolls out asymmetric keys, we can deprecate this workflow.

@changeset-bot
Copy link

changeset-bot bot commented Nov 27, 2024

🦋 Changeset detected

Latest commit: 9c21009

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

This PR includes changesets to release 8 packages
Name Type
@powersync/service-core Minor
@powersync/service-types Minor
@powersync/service-image Minor
@powersync/service-module-mongodb Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres Patch
test-client Patch
@powersync/service-jpgwire 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

Copy link
Collaborator

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tested and verified this works.

@stevensJourney stevensJourney merged commit 35c267f into main Nov 28, 2024
15 checks passed
@stevensJourney stevensJourney deleted the supabase-static-keys branch November 28, 2024 14:34
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