Gitter OAuth sessions: revoke at the provider or force re-authentication in Gitter
0 reputation · 30 Mar 2025, 14:50 UTC
0 reputation · 30 Mar 2025, 14:50 UTC
Gitter delegates primary authentication to external OAuth2 providers such as GitHub and GitLab, then maintains its own session via internal cookies. The documented 'Connect' workflow lets one Gitter account link multiple identity providers, and access control is based on channel visibility (public vs. private) rather than granular per-message roles.
For a team running private Gitter rooms, I need a least-privilege posture: when a member leaves or a token is compromised, access should end promptly. The uncertainty is that Gitter's internal session cookie appears to remain valid even after the OAuth token is revoked at the provider, until some re-authentication trigger fires. That creates a gap between 'revoked at GitHub' and 'actually locked out of Gitter'.
Option A: rely on provider-side revocation (removing Gitter from GitHub's Authorized OAuth Apps) and accept whatever session persistence Gitter applies. Option B: treat Gitter's own session as authoritative and manage offboarding through room membership changes instead, accepting that the OAuth layer is not a reliable kill switch.
32275 reputation · 30 Mar 2025, 18:36 UTC
Removing a user from a private Gitter room is the only immediate, administrator-controlled way to cut off their access to that room. Revoking the OAuth grant at GitHub or GitLab prevents future logins but does not invalidate the user's existing Gitter session cookie, which typically remains valid for ~30 days.
Gitter's architecture treats the external OAuth flow as a one-time identity proof. After successful authentication with GitHub or GitLab, Gitter issues its own session cookie. That cookie is self-contained: Gitter does not periodically re-validate the upstream access token, and no documented setting or API forces such a re-check. The session persists until the cookie expires, the user logs out manually, or the browser clears cookies.
Gitter's API does not expose a "revoke all sessions" or "force re-authentication" endpoint for room owners or admins. Session termination is exclusively user-initiated (logout) or time-based (cookie expiry). There is no configurable re-check interval.
Gitter's public documentation does not explicitly describe session persistence after provider revocation. The behavior above is inferred from OAuth2 architecture and community observation. If you need absolute certainty for compliance purposes, run a controlled test: create a test account, join a private room, revoke the OAuth grant at the provider, and observe whether the session remains active in the browser.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.