Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24371637
D3968.id10281.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3968.id10281.diff
View Options
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -223,11 +223,15 @@
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
```
4. Generate an admin JWT token:
- ```bash
- docker compose exec backend node -e "const {generateToken} = require('./middleware/auth.js'); console.log(generateToken({role:'admin'}))"
- ```
+ ```bash
+ docker compose exec backend node -e "const {generateToken} = require('./middleware/auth.js'); console.log(generateToken({role:'admin'}))"
+ ```
5. Use the token to log into the admin dashboard at `/admin/login`
+> **Note:** Tokens are signed with `JWT_SECRET`. Changing the secret invalidates
+> all existing tokens — you must generate a new one. After changing `JWT_SECRET`,
+> recreate the containers with `docker compose down && docker compose up -d`.
+
### Reverse Proxy (Nginx)
For production, place Nginx in front to serve the frontend and proxy API requests:
diff --git a/backend/README.md b/backend/README.md
--- a/backend/README.md
+++ b/backend/README.md
@@ -90,6 +90,11 @@
The token is valid for 24 hours by default.
+> **Important:** Tokens are signed with `JWT_SECRET`. If you change the secret
+> in your `.env`, all previously generated tokens become invalid and you must
+> generate a new one. After changing `JWT_SECRET`, recreate the containers with
+> `docker compose down && docker compose up -d` to apply the new value.
+
### Using the token
1. Copy the generated token
diff --git a/backend/config/app.json b/backend/config/app.json
--- a/backend/config/app.json
+++ b/backend/config/app.json
@@ -1,6 +1,6 @@
{
"navbar": {
- "title": "Codrlabs Uptime",
+ "title": "ServPulse",
"buttons_left": [
{
"name": "DevCentral",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 08:16 (10 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3454797
Default Alt Text
D3968.id10281.diff (1 KB)
Attached To
Mode
D3968: Fix default app title and document JWT secret behavior - Replace "Codrlabs Uptime" with "ServPulse" as default app title - Document that changing JWT_SECRET invalidates existing tokens
Attached
Detach File
Event Timeline
Log In to Comment