store plaintext secret key in .env, hash at startup

This commit is contained in:
dmit.b
2026-06-25 16:43:49 +03:00
parent 9644b64a90
commit 8df9af86e6
4 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -11,5 +11,5 @@ POSTGRES_USER="user"
POSTGRES_PASSWORD="pwd"
# TOKEN_LIFETIME in minutes
TOKEN_LIFETIME=600
# Secret key for registration (bcrypt hash, client sends plaintext key)
REGISTRATION_SECRET_KEY=$2a$10$example.bcrypt.hash.here
# Secret key for registration (plaintext, hashed with bcrypt at startup)
REGISTRATION_SECRET_KEY=your-registration-key