Multiplayer: Gitea OIDC login flow (step 2/12) #106

Closed
opened 2026-09-22 10:31:19 +02:00 by kamilkrzywda · 2 comments
Owner

Part of the #101 multiplayer plan.

Register an OAuth2 application on git.kkhost.pl (/admin/applications/, callback https://flight.dev.kkhost.pl/api/auth/callback), then add lib/auth.ts + app/api/auth/{login,callback,logout}/route.ts: discovery-driven authorization-code flow (scope=openid, confidential client via env vars GITEA_ISSUER/CLIENT_ID/CLIENT_SECRET — the host already serves a live OIDC discovery doc at https://git.kkhost.pl/.well-known/openid-configuration), upsert player by sub, set httpOnly signed session cookie. Keep issuer/client config in env so swapping to any other OIDC IdP later is config-only.

Part of the #101 multiplayer plan. Register an OAuth2 application on git.kkhost.pl (/admin/applications/, callback https://flight.dev.kkhost.pl/api/auth/callback), then add lib/auth.ts + app/api/auth/{login,callback,logout}/route.ts: discovery-driven authorization-code flow (scope=openid, confidential client via env vars GITEA_ISSUER/CLIENT_ID/CLIENT_SECRET — the host already serves a live OIDC discovery doc at https://git.kkhost.pl/.well-known/openid-configuration), upsert player by `sub`, set httpOnly signed session cookie. Keep issuer/client config in env so swapping to any other OIDC IdP later is config-only.
kamilkrzywda added the wontfix label 2026-09-23 12:54:44 +02:00
Author
Owner

we wont use this flow - for now only add simple account creating in local DB

we wont use this flow - for now only add simple account creating in local DB
kamilkrzywda added the invalid label 2026-09-23 12:56:29 +02:00
Author
Owner

Closed per decision above — simple local account creation instead of OIDC; plan updated on #107/#116.

Closed per decision above — simple local account creation instead of OIDC; plan updated on #107/#116.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#106