Skip to content

Commit 29c2341

Browse files
committed
Adjustments to authentication doc
1 parent 1334c65 commit 29c2341

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

docs/authentication.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Edit `postgres/Dockerfile` to build and install the extension:
2020

2121
```sh
2222
RUN apt-get update && apt-get install -y \
23-
build-essential \
24-
postgresql-server-dev-17
23+
build-essential \
24+
postgresql-server-dev-17
2525

2626
# pgjwt - used by auth schema
2727
COPY ./pgjwt /pgjwt
@@ -37,14 +37,22 @@ Then rebuild:
3737
docker compose build postgres
3838
```
3939

40+
And recreate the running container:
41+
42+
```sh
43+
docker compose up -d postgres
44+
```
45+
4046
## ➡️ 2. Add Migrations
4147

4248
### 📚 Load Required Extensions
4349

4450
Add this to a migration file like `01-extensions.sql`:
4551

4652
```sql
47-
-- pgcrypto adds public.crypt used in auth.encrypt_pass
53+
/* pgcrypto adds public.crypt used in auth.encrypt_pass pgjwt also needs this
54+
so it must be loaded first. pgcrypto is built into Postgres, so no need to
55+
install it. */
4856
create extension pgcrypto;
4957

5058
-- pgjwt adds public.sign used in auth.generate_access_token
@@ -212,7 +220,7 @@ commit;
212220

213221
### 👮 Grant Permissions
214222

215-
Add another migration such as `99-roles_and_grants.sql`:
223+
Add another migration such as `99-grants.sql`:
216224

217225
```sql
218226
begin;

0 commit comments

Comments
 (0)