Skip to content

Commit 1ce69e1

Browse files
committed
More supabase auth references
1 parent f75d680 commit 1ce69e1

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

self-hosting/appendix/database-connection.mdx

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,34 @@ Below, you can find provider-specific instructions to obtain connection details
88

99
<AccordionGroup>
1010
<Accordion title="Supabase">
11-
1. In your Supabase dashboard, navigate to **"Project Settings"** \-> **"Database" -> "Connection string**" and select the "URI" tab.
12-
2. Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
13-
14-
<Frame>
15-
<img src="/images/self-hosting-3.avif"/>
16-
</Frame>
17-
1. Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
18-
2. Paste this URI into the `uri` field under `replication` \> `connections` in your configuration file, for example:
19-
20-
```yaml
21-
# config.yaml
22-
23-
replication:
24-
connections:
25-
- type: postgresql
26-
uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres
27-
```
28-
29-
1. Replace `[YOUR-PASSWORD]` with the password for the `postgres` user in your Supabase database.
30-
* Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the _database password_ or _project password_.
31-
2. PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
32-
3. Under `client_auth` enable Supabase Auth:
33-
34-
```yaml
35-
client_auth:
36-
supabase: true
37-
```
11+
1. In your Supabase dashboard, navigate to **"Project Settings"** \-> **"Database" -> "Connection string**" and select the "URI" tab.
12+
2. Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
13+
<Frame>
14+
<img src="/images/self-hosting-3.avif"/>
15+
</Frame>
16+
3. Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
17+
4. Paste this URI into the `uri` field under `replication` \> `connections` in your configuration file, for example:
18+
19+
```yaml
20+
# config.yaml
21+
22+
replication:
23+
connections:
24+
- type: postgresql
25+
uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres
26+
```
27+
28+
5. Replace `[YOUR-PASSWORD]` with the password for the `postgres` user in your Supabase database.
29+
* Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the _database password_ or _project password_.
30+
6. PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
31+
7. Under `client_auth` enable Supabase Authentication:
32+
33+
```yaml
34+
client_auth:
35+
supabase: true
36+
supabase_jwt_secret: [secret]
37+
```
38+
For more details, see [Supabase Auth](/installation/authentication-setup/supabase-auth).
3839
</Accordion>
3940
<Accordion title="AWS RDS">
4041
Add your connection details under `replication` \> `connections` in your configuration file.

self-hosting/installation/client-side-setup.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@ If you are using Supabase or Firebase authentication, PowerSync can verify JWTs
9797

9898
### Supabase Auth
9999

100-
Under `client_auth` in your config file, enable `supabase` authentication:
100+
Under `client_auth` in your config file, enable Supabase authentication:
101101

102102
```yaml
103103
# config.yaml
104104
105105
client_auth:
106106
# Enable this if using Supabase Auth
107107
supabase: true
108+
supabase_jwt_secret: [secret]
108109
```
109110

110111
For more details, see [Supabase Auth](/installation/authentication-setup/supabase-auth).

0 commit comments

Comments
 (0)