Changing Password
Via the UI
- Log in to the DocBot UI.
- Go to Account Settings.
- Choose Change Password.
- Enter your current password, then your new password, and confirm.
Via the API
Send a PUT request to /api/auth/password with your current and new password:
curl -s -X PUT http://localhost:8000/api/auth/password \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"current_password": "old-password",
"new_password": "new-secure-password"
}'
Rotating the JWT Secret Key
For additional security, consider periodically rotating the JWT_SECRET_KEY in your .env file:
- Generate a new random secret (e.g.
openssl rand -hex 32). - Update
JWT_SECRET_KEYin.env. - Restart the backend:
docker compose up -d backend.
note
Rotating the JWT secret key invalidates all existing access and refresh tokens. All users will need to log in again.