Gitter OAuth session persistence after upstream credential revocation
0 reputation · 26 Apr 2022, 00:26 UTC
0 reputation · 26 Apr 2022, 00:26 UTC
This concerns the Gitter web application using OAuth 2.0 with GitHub or GitLab as the identity provider. A user revokes Gitter's OAuth authorization in the provider settings, expecting the linked Gitter session to end immediately. Gitter delegates credential expiration to the third-party provider and issues its own session token after the OAuth handshake. It is unclear whether revoking the upstream grant invalidates the existing Gitter session or whether the session remains active until the Gitter-issued token expires.
The least-privilege boundary is also fixed by the scopes accepted during the original authorization, with no documented mechanism to reduce scopes without re-authenticating.
Does revoking GitHub or GitLab access terminate an active Gitter session immediately? Can a user shorten the Gitter session lifetime independently of the identity provider? Are scoped permissions revisable without a full OAuth re-authorization?
34775 reputation · 26 Apr 2022, 08:37 UTC
No. Revoking Gitter's OAuth authorization at GitHub or GitLab should not be assumed to terminate an active Gitter web session immediately. If Gitter issues its own session token after the OAuth handshake, that session normally remains usable until the Gitter-issued token expires or Gitter explicitly invalidates it. Separately, the scopes granted during the original authorization are fixed for that grant; you cannot reduce them on the existing grant without re-authorizing.
Likely explanation (OAuth delegation pattern): OAuth revocation is primarily a signal to the identity provider to invalidate the upstream grant or token. Unless the relying party checks token revocation or introspection on every request, or consumes provider notifications, the upstream revocation does not automatically push an invalidation event into the relying party's own session store. Gitter's session is a separate credential with its own lifetime.
Confirmed facts: This answer is based on general OAuth 2.0 behavior and the stated assumption that Gitter issues its own session token after login. It is not a confirmed audit of Gitter's current implementation. Gitter's session lifetime, cookie flags, and any sign-out-everywhere feature may have changed and require verification.
Scopes are bound to the original authorization grant. There is no standard OAuth mechanism to narrow scopes on an existing grant. To reduce permissions, revoke Gitter's access at the identity provider and complete a new OAuth authorization with the narrower scope set. Some providers offer a re-consent screen that may allow scope changes without full revocation, but this is provider-specific and not guaranteed.
Does Gitter validate the upstream token on every request, or only at login? If Gitter performs per-request validation with revocation checks, upstream revocation could produce faster session termination than the login-only pattern described above. This single detail determines whether the session should end immediately or only after the Gitter token expires.
Because Gitter's current session behavior is not confirmed here, test in a clean browser profile: sign in to Gitter, revoke Gitter's access at GitHub or GitLab, then reload Gitter without clearing cookies. Inspect the Gitter session cookie in developer tools for its expiry timestamp and compare it with the revocation time. Repeat separately for GitHub and GitLab, and record whether Gitter actions fail immediately or only after the Gitter session expires.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 26 Apr 2022, 03:13 UTC
When a user logs into Gitter via GitHub or GitLab, the provider issues an access_token that Gitter stores temporarily. After the handshake, Gitter creates its own session cookie (e.g., gitter_session) that is independent of the provider’s token lifecycle. Revoking the grant in the provider’s settings only prevents future access_token refreshes; it does not automatically invalidate the existing Gitter session. The user remains logged in until the Gitter cookie expires or the user logs out.
Gitter does not perform per‑request token introspection or revocation checks by default, so the session can’t be shortened on the fly. To end the session immediately, the user must either log out in Gitter or clear the session cookie from the browser.
Scopes granted during the initial authorization are fixed; reducing them requires the user to re‑authorize and accept a new consent screen.