feat: implement user profile management and oauth/traefik integration

User Profile (US-004):
- Add authenticated profile endpoints (GET/PUT /users/me)
- Add avatar upload with file validation (PNG/JPEG, max 2MB)
- Create frontend profile page with edit form and avatar upload
- Update app shell to link to profile page

OAuth/Traefik Integration:
- Externalize all Authentik URLs to environment variables
- Add domain configuration (API_DOMAIN, WEB_DOMAIN, AUTHENTIK_DOMAIN)
- Create docker-compose.traefik.yml for reverse proxy deployment
- Update OAuth redirect/callback URLs to use configured domains
- Add VITE_APP_URL for frontend public URL configuration

Quality gates: pytest (50 passed), ruff, mypy, npm test (12 passed), typecheck, lint, build
This commit is contained in:
Fusion
2026-05-17 23:17:10 +02:00
parent 56f440db1b
commit 577b052c05
32 changed files with 1153 additions and 16 deletions
+4 -4
View File
@@ -23,7 +23,7 @@ def build_login_redirect_url(
"nonce": nonce,
}
)
return f"{settings.authentik_authorize_url}?{query}"
return f"{settings.resolved_authentik_authorize_url}?{query}"
async def exchange_code_for_tokens(
@@ -34,7 +34,7 @@ async def exchange_code_for_tokens(
client: httpx.AsyncClient,
) -> dict[str, str]:
response = await client.post(
settings.authentik_token_url,
settings.resolved_authentik_token_url,
data={
"grant_type": "authorization_code",
"code": code,
@@ -52,7 +52,7 @@ async def exchange_code_for_tokens(
async def fetch_jwks(*, settings: Settings, client: httpx.AsyncClient) -> dict[str, list[dict[str, str]]]:
response = await client.get(settings.authentik_jwks_url)
response = await client.get(settings.resolved_authentik_jwks_url)
response.raise_for_status()
payload = response.json()
return {"keys": payload["keys"]}
@@ -72,6 +72,6 @@ def verify_provider_access_token(
jwk_key,
algorithms=[jwk_key.get("alg", "HS256")],
audience=settings.authentik_audience,
issuer=settings.authentik_issuer,
issuer=settings.resolved_authentik_issuer,
)
return dict(claims)