File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
modules/module-postgres/src/module Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @powersync/service-module-postgres ' : patch
3+ ' @powersync/service-image ' : patch
4+ ---
5+
6+ Disable SupabaseKeyCollector when a specific secret is configured.
Original file line number Diff line number Diff line change @@ -23,7 +23,16 @@ export class PostgresModule extends replication.ReplicationModule<types.Postgres
2323 async initialize ( context : system . ServiceContextContainer ) : Promise < void > {
2424 await super . initialize ( context ) ;
2525
26- if ( context . configuration . base_config . client_auth ?. supabase ) {
26+ const client_auth = context . configuration . base_config . client_auth ;
27+
28+ if ( client_auth ?. supabase && client_auth ?. supabase_jwt_secret == null ) {
29+ // Only use the deprecated SupabaseKeyCollector when there is no
30+ // secret hardcoded. Hardcoded secrets are handled elsewhere, using
31+ // StaticSupabaseKeyCollector.
32+
33+ // Support for SupabaseKeyCollector is deprecated and support will be
34+ // completely removed by Supabase soon. We can keep support a while
35+ // longer for self-hosted setups, before also removing that on our side.
2736 this . registerSupabaseAuth ( context ) ;
2837 }
2938
You can’t perform that action at this time.
0 commit comments