Skip to content

fix(auth): Fix admin user authentication for /users/db-health endpoin…#422

Merged
LukeGus merged 1 commit intoTermix-SSH:dev-1.8.0from
suraimu-team:fix/admin-cookie-jwt
Oct 20, 2025
Merged

fix(auth): Fix admin user authentication for /users/db-health endpoin…#422
LukeGus merged 1 commit intoTermix-SSH:dev-1.8.0from
suraimu-team:fix/admin-cookie-jwt

Conversation

@suraimu-team
Copy link
Copy Markdown
Contributor

@suraimu-team suraimu-team commented Oct 20, 2025

…t 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: Termix-SSH/Support#12

Overview

Short summary of what this PR does

  • Added: ...
  • Updated: ...
  • Removed: ...
  • Fixed: ...

Changes Made

Detailed explanation of changes (if needed)

  • ...

Related Issues

Link any issues this PR addresses

  • Closes #ISSUE_NUMBER
  • Related to #ISSUE_NUMBER

Screenshots / Demos

(Optional: add before/after screenshots, GIFs, or console output)

Checklist

  • Code follows project style guidelines
  • Supports mobile and desktop UI/app (if applicable)
  • I have read Contributing.md

…t 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: Termix-SSH/Support#12
@LukeGus
Copy link
Copy Markdown
Member

LukeGus commented Oct 20, 2025

Thanks. I'll review it and merge it into v1.8.0 launching in about a week or two.

@LukeGus LukeGus changed the base branch from main to dev-1.8.0 October 20, 2025 18:01
@LukeGus LukeGus merged commit 5cc3e47 into Termix-SSH:dev-1.8.0 Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation without Docker – 401 Unauthorized Errors (Missing Authorization Header)

2 participants