keycloak: end the bitborg-id session on forgejo sign-out #646

Stängd
öppnade 2026-10-10 17:39:23 +00:00 av supernaut · 1 kommentar
Ägare

What

Signing out of Forgejo ends only the Forgejo session. The Bitborg-id (Keycloak) session stays, so the next "Sign in with Bitborg-id" signs the person straight back in. The portal already ends the Keycloak session on logout (#333 in bitborg-web).

Why

On a shared computer, a person who signs out of Forgejo expects to be signed out. The FAQ explains the gap for now.

Fix

Prototype single logout without patching Forgejo: after Forgejo's logout, send the browser to Keycloak's end_session endpoint with client_id and a post_logout_redirect_uri back to git.*. Candidates are a Caddy handle_response on Forgejo's logout response, or a small custom Forgejo template change. Check how Forgejo issues the logout request first.

Done when

  • Forgejo sign-out also ends the Keycloak session, without a Keycloak confirm page.
  • The FAQ item is updated or removed.

After cutover (#575).

## What Signing out of Forgejo ends only the Forgejo session. The Bitborg-id (Keycloak) session stays, so the next "Sign in with Bitborg-id" signs the person straight back in. The portal already ends the Keycloak session on logout (#333 in bitborg-web). ## Why On a shared computer, a person who signs out of Forgejo expects to be signed out. The FAQ explains the gap for now. ## Fix Prototype single logout without patching Forgejo: after Forgejo's logout, send the browser to Keycloak's `end_session` endpoint with `client_id` and a `post_logout_redirect_uri` back to `git.*`. Candidates are a Caddy `handle_response` on Forgejo's logout response, or a small custom Forgejo template change. Check how Forgejo issues the logout request first. ## Done when - [ ] Forgejo sign-out also ends the Keycloak session, without a Keycloak confirm page. - [ ] The FAQ item is updated or removed. After cutover (#575).
Upphovsperson
Ägare

Seen on staging on 2026-10-14 with isolated Keycloak. Sign-out returns 200 (POST /user/logout). Forgejo then goes / → /explore (303) → /user/oauth2/Bitborg-id → callback. The open Keycloak session signs the user in again. A red flash blinks too briefly to read.

Seen on staging on 2026-10-14 with isolated Keycloak. Sign-out returns 200 (`POST /user/logout`). Forgejo then goes `/` → `/explore` (303) → `/user/oauth2/Bitborg-id` → callback. The open Keycloak session signs the user in again. A red flash blinks too briefly to read.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra#646
Ingen beskrivning angiven.