diff --git a/images/integration-guides/powersync-supabase-connection.png b/images/integration-guides/powersync-supabase-connection.png new file mode 100644 index 00000000..3566eb15 Binary files /dev/null and b/images/integration-guides/powersync-supabase-connection.png differ diff --git a/snippets/supabase-database-connection.mdx b/snippets/supabase-database-connection.mdx index bd1e4bf7..f1cbf2e0 100644 --- a/snippets/supabase-database-connection.mdx +++ b/snippets/supabase-database-connection.mdx @@ -1,31 +1,38 @@ -1. In your Supabase Dashboard, click **Connect** in the top bar: - - - - +1. From your Supabase Dashboard, select **Connect** in the top navigation bar: - * Under **Direct connection**, copy the connection string. The hostname should be `db..supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`. - - - - + + + + + * In the **Direct connection** section, copy the complete connection string (including the `[YOUR-PASSWORD]` placeholder) + + + + - * Paste this URI in PowerSync instance **URI** field. + * Paste the connection string into the PowerSync instance **URI** field. PowerSync will automatically parse this URI to populate the connection details. - * Enter the **Password** for the `postgres` user in your Supabase database. + * For the **Password** field, enter your database's `postgres` user password (this is your database/project password, not your Supabase account password). Need help? Check Supabase's guide on [managing database passwords](https://supabase.com/docs/guides/database/managing-passwords). - * Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the *database password* or *project password*. + * Note: PowerSync includes Supabase's CA certificate by default, so you can use `verify-full` SSL mode without additional configuration. + + Your connection settings should look similar to this: + + + + - * PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates. +2. Verify your setup by clicking **Test Connection** and resolve any errors. -2. Click **Test Connection** and fix any errors. +3. Configure authentication: + * Navigate to the **Client Auth** tab + * Enable **Use Supabase Auth** + * Enter your Supabase **JWT Secret** -3. Under the **Client Auth** tab, enable **Use Supabase Auth** and enter your Supabase **JWT Secret**: - - + -4. Click **Save and deploy** to deploy the updates to your instance. +4. Click **Save and deploy** to apply your changes. -PowerSync deploys and configures an isolated cloud environment for you, which will take a few minutes to complete. \ No newline at end of file +PowerSync will now create an isolated cloud environment for your instance. This process typically takes a few minutes.