Files
Termix/src/backend
suraimu-team 83c370425e fix(auth): Fix admin user authentication for /users/db-health endpoint by adding cookie JWT support
Fixed authentication issue for admin users accessing the /users/db-health endpoint:

- Added JWT token extraction from cookies (req.cookies?.jwt)
- Added support for Bearer token from Authorization header
- Improved error handling for missing and invalid tokens
- Ensured consistent authentication flow for admin users

Changes made:
- Check for JWT token in req.cookies?.jwt
- Support Bearer token from Authorization header
- Return 401 error when token is missing
- Return 401 error when token validation fails

Fixes: https://github.com/Termix-SSH/Support/issues/12
2025-10-20 16:41:02 +08:00
..
2025-10-08 23:55:33 -05:00
2025-10-01 15:40:10 -05:00