Portalen saknade en väg till en verifierad principal: /api/0pt/* kräver Bearer, men webbläsaren hade bara dev-cookien.
GET /api/auth/login: Authorization Code + PKCE mot Zitadel.
GET /api/auth/callback: kodväxling, id_token-verifiering (issuer, audience, nonce) och signerad sessionscookie med sub + tenant.
Middleware accepterar sessionen som verifierad principal; Bearer vinner.
Dev-login nekas i produktion.
Verifierat: typecheck, build; OIDC-app skapad i Zitadel-projektet 0pt.
Portalen saknade en väg till en verifierad principal: `/api/0pt/*` kräver Bearer, men webbläsaren hade bara dev-cookien.
- `GET /api/auth/login`: Authorization Code + PKCE mot Zitadel.
- `GET /api/auth/callback`: kodväxling, id_token-verifiering (issuer, audience, nonce) och signerad sessionscookie med sub + tenant.
- Middleware accepterar sessionen som verifierad principal; Bearer vinner.
- Dev-login nekas i produktion.
Verifierat: typecheck, build; OIDC-app skapad i Zitadel-projektet `0pt`.
The portal had no way to obtain a verified principal: /api/0pt/* requires a
Bearer token, but the browser only had the dev-only HMAC cookie.
- GET /api/auth/login: Authorization Code + PKCE against Zitadel.
- GET /api/auth/callback: code exchange, id_token verification (issuer,
audience, nonce) and a signed session cookie with sub + tenant.
- middleware accepts the signed session as a verified principal; Bearer wins.
- dev login POST is refused in production.
- Sign-in link in the portal shell.
CODEOWNERS rules
requested review from sax3l 2026-11-02 14:48:18 +00:00
Zitadel does not always copy urn:zitadel:iam:org:id into the id_token; the
access token always carries it. Verify that token (issuer) before trusting its
tenant.
admin
merged commit bc7868c789 into main2026-11-02 14:54:55 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Portalen saknade en väg till en verifierad principal:
/api/0pt/*kräver Bearer, men webbläsaren hade bara dev-cookien.GET /api/auth/login: Authorization Code + PKCE mot Zitadel.GET /api/auth/callback: kodväxling, id_token-verifiering (issuer, audience, nonce) och signerad sessionscookie med sub + tenant.Verifierat: typecheck, build; OIDC-app skapad i Zitadel-projektet
0pt.