You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/postgresql/quickstarts/postgres.md
+22-49Lines changed: 22 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,72 +84,45 @@ If the extension is installed correctly, PostgreSQL returns the CloudSync versio
84
84
85
85
## Step 3: Register Your Database in the CloudSync Dashboard
86
86
87
-
### 2.1 Create a Workspace
87
+
In the [CloudSync dashboard](https://dashboard.sqlitecloud.io/), create a new workspace with the **PostgreSQL** provider, then add a project with your PostgreSQL connection string:
88
88
89
-
1. Log in to the CloudSync dashboard
90
-
2. Click **New Workspace**
91
-
3. Choose provider: **PostgreSQL**
92
-
4. Enter a workspace name
93
-
5. Click **Create**
89
+
```
90
+
postgresql://user:password@host:5432/database
91
+
```
94
92
95
-
### 2.2 Create a CloudSync Project
93
+
---
96
94
97
-
1. In the workspace, click **New CloudSync Project**
98
-
2. **Project name:** Give it a descriptive name
99
-
3. **Connection string:** Enter your PostgreSQL connection:
100
-
```
101
-
postgresql://user:password@host:5432/database
102
-
```
103
-
5. Click **Create**
95
+
## Step 4: Enable CloudSync on Tables
96
+
97
+
In the dashboard, go to the **Database Setup** tab, select the tables you want to sync, and click **Deploy Changes**.
104
98
105
99
---
106
100
107
-
## Step 4: Set Up Authentication
101
+
## Step 5: Set Up Authentication
102
+
103
+
On the **Client Integration** tab you'll find your **Database ID** and authentication settings.
108
104
109
105
### Quick Test with API Key (Recommended for Testing)
110
106
111
107
The fastest way to test CloudSync without per-user access control — no JWT setup needed.
112
108
113
-
1. Get PostgreSQL credentials for a user with sufficient permissions on the tables CloudSync will sync
114
-
2. In your client code (SQLite), authenticate with:
If you need role-based access control (RLS) or production security:
126
-
127
-
1. **Prepare your JWT authentication:**
128
-
- **For HS256 (shared secret):** Use your existing secret, or generate one: `openssl rand -base64 32`
129
-
- **For RS256 (asymmetric/JWKS):** Have your auth system's issuer URL and JWKS endpoint ready
130
-
2. **Update CloudSync dashboard configuration:**
131
-
- Go to your project's **Configuration** tab
132
-
- Click **Edit connection settings**
133
-
- **For HS256 (shared secret):** Enter your JWT secret
134
-
- **For RS256 (asymmetric):** Enter the same issuer base URL used in the token's `iss` claim, for example `https://your-auth-domain`
135
-
- Do not include `/.well-known/jwks.json` in this field. CloudSync uses the issuer URL and fetches the JWKS document automatically.
136
-
- Click **Save**
137
-
3. **Get JWT tokens** — choose one:
138
-
- **Testing only:** [jwt.io](https://jwt.io/) — paste your JWT secret, generate a test token
139
-
- **Existing auth system:** Use tokens from your current auth provider
140
-
4. **In your client code:**
119
+
1. Set **Row Level Security** to **Yes, enforce RLS**
120
+
2. Under **Authentication (JWT)**, click **Configure authentication** and choose:
121
+
- **HMAC Secret (HS256):** Enter your JWT secret (or generate one: `openssl rand -base64 32`)
122
+
- **JWKS Issuer Validation:** Enter the issuer base URL from your token's `iss` claim (e.g. `https://your-auth-domain`). CloudSync fetches the JWKS document automatically
Copy file name to clipboardExpand all lines: docs/postgresql/quickstarts/supabase.md
+22-47Lines changed: 22 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,70 +85,45 @@ If the extension is installed correctly, PostgreSQL returns the CloudSync versio
85
85
86
86
## Step 3: Register Your Database in the CloudSync Dashboard
87
87
88
-
### 2.1 Create a Workspace
88
+
In the [CloudSync dashboard](https://dashboard.sqlitecloud.io/), create a new workspace with the **Supabase (Self-hosted)** provider, then add a project with your PostgreSQL connection string:
89
89
90
-
1. Log in to the CloudSync dashboard
91
-
2. Click **New Workspace**
92
-
3. Choose provider: **Supabase (Self-hosted)**
93
-
4. Enter a workspace name
94
-
5. Click **Create**
90
+
```
91
+
postgresql://user:password@host:5432/database
92
+
```
95
93
96
-
### 2.2 Create a CloudSync Project
94
+
---
97
95
98
-
1. In the workspace, click **New CloudSync Project**
99
-
2. **Project name:** Give it a descriptive name (e.g., `my-app-sync`)
100
-
3. **Connection string:** Enter your PostgreSQL connection:
101
-
```
102
-
postgresql://user:password@host:5432/database
103
-
```
104
-
4. Click **Create**
96
+
## Step 4: Enable CloudSync on Tables
97
+
98
+
In the dashboard, go to the **Database Setup** tab, select the tables you want to sync, and click **Deploy Changes**.
105
99
106
100
---
107
101
108
-
## Step 4: Set Up Authentication
102
+
## Step 5: Set Up Authentication
103
+
104
+
On the **Client Integration** tab you'll find your **Database ID** and authentication settings.
109
105
110
106
### Quick Test with API Key (Recommended for Testing)
111
107
112
108
The fastest way to test CloudSync without per-user access control — no JWT setup needed.
113
109
114
-
1. Get PostgreSQL credentials for a user with sufficient permissions on the tables CloudSync will sync
115
-
2. In your client code (SQLite), authenticate with:
0 commit comments