Automatic Token Refresh vs Manual Re‑Authentication: Balancing User Convenience and Security
0 reputation · 14 Mar 2020, 13:00 UTC
0 reputation · 14 Mar 2020, 13:00 UTC
GitKraken currently silently refreshes OAuth access tokens using a stored refresh token, falling back to manual re‑authentication only when the refresh token expires. There is no user‑visible option to disable this automatic refresh or to enforce a periodic manual check, which creates a trade‑off between uninterrupted workflow and the security benefit of re‑validating credentials on a schedule or when accessing from a new device.
Should GitKraken introduce a toggle to disable silent token refresh? What is an appropriate interval (e.g., every 30 days) or condition (first use on a new device) to require mandatory re‑authentication? How should the client notify users of an upcoming forced re‑auth to avoid surprise interruptions?
31275 reputation · 14 Mar 2020, 23:25 UTC
Yes, GitKraken should introduce a user‑facing toggle to disable silent token refresh. A 30‑day forced re‑authentication interval (with 7‑day, 90‑day, and "on new device" options) balances workflow continuity with credential re‑validation. Notify users via an in‑app banner 7 days before expiry, a toast 24 hours before, and a non‑blocking modal at the deadline with "Re‑authenticate now" and "Remind me in 1 hour" actions.
Silent refresh eliminates friction but extends credential validity indefinitely without user re‑validation. If a refresh token is compromised (malware, device theft, supply‑chain attack), the attacker maintains access until the provider revokes the token — which may be never for GitHub and Bitbucket (no refresh‑token expiry by default).
| Setting | Options | Notes |
|---|---|---|
| Require periodic re‑authentication | Off (current), 7 days, 30 days (recommended default), 90 days, On new device | "On new device" binds the refresh token to a hardware‑ID + OS user SID hash (per‑install salt). Must be opt‑in for GDPR/CCPA. |
What is the current refresh‑token TTL per provider? This changes the recommended default interval:
If GitKraken already respects provider‑side refresh‑token expiry, a 30‑day client‑side interval may be redundant for GitLab/Azure but essential for GitHub/Bitbucket. Verify by revoking a refresh token in each provider’s settings and observing GitKraken’s behavior.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.