Files
api/services/auth
Roberto Musso 9feeaa79c8 feat(auth): migrate JWT from HS256 to RS256
- Add services/auth/app/config.py with JWT_PRIVATE_KEY and JWT_PUBLIC_KEY
  (Auth Service local config - private key never leaves this service)
- Update routes.py: sign tokens with RS256 private key
- Update deps.py + verify.py: verify tokens with RS256 public key
- Update shared/config.py: replace JWT_SECRET/JWT_ALGORITHM with
  JWT_PUBLIC_KEY (for optional local verification by other services)
- Add sys.path fix in main.py for local dev without PYTHONPATH
2026-03-22 00:50:36 +01:00
..

Auth Service

Owns: user registration, login, JWT RS256 issuance, token refresh, /me endpoint.

Tables owned

  • users
  • refresh_tokens
  • subscriptions (read; Billing Service writes)

Endpoints

  • POST /auth/register
  • POST /auth/login
  • POST /auth/refresh
  • GET /auth/me
  • PUT /auth/me
  • GET /auth/verify (ForwardAuth for Traefik)