Add local authentication option (#37)
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m20s
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m20s
Co-authored-by: Shaun Campbell <shaun@campbellwireless.net> Reviewed-on: #37 Co-authored-by: AI Agent <ai-agent@campbellwireless.net> Co-committed-by: AI Agent <ai-agent@campbellwireless.net>
This commit was merged in pull request #37.
This commit is contained in:
13
README.md
13
README.md
@@ -43,6 +43,19 @@ bun install
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Local authentication
|
||||
|
||||
Local auth is optional and off by default. Enable it with the env vars in `.env.example` and ensure users have a matching row in both `users` and `local_credentials`.
|
||||
|
||||
To seed a local password hash, use Argon2id with the configured parameters and insert it into `local_credentials`:
|
||||
|
||||
```sql
|
||||
INSERT INTO local_credentials (user_id, password_hash)
|
||||
VALUES ('<user-id>', '<argon2id hash>');
|
||||
```
|
||||
|
||||
Passwords must be at least 12 characters. Avoid storing plaintext passwords anywhere.
|
||||
|
||||
## Quality and Tests
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user