· 2 min read · Engineering & delivery · 閱讀中文版
After a token expires: include refresh in sign-in acceptance
GitHub’s upcoming requirement for expiring user tokens makes refresh failures, concurrent requests, and reauthorization part of delivery acceptance.
On this page
GitHub announced on December 4, 2026 that newly registered GitHub Apps and OAuth apps will require expiring user access tokens from January 5, 2027; previously issued tokens are unaffected. This is a reminder that successful sign-in is only a starting point. The following checks are proposed guidance, not a migration report for this site.
Identify the credential in scope
Record the application type, registration timing, and credential being tested. A user-token announcement should not trigger unrelated changes to every background job or credential. The delivery scope needs to match both the announcement and the authentication flow actually used.
I would retain SDK versions, configuration, and the purpose of the test account, but never token values. When someone later asks why a service requires another sign-in, that context helps distinguish refresh behavior, authorization state, and unrelated failures.
Exercise expiration, not just first sign-in
In an isolated test environment, simulate an expired access credential and check whether the application refreshes it according to its SDK and official documentation before continuing an authorized read. Also test an unavailable refresh credential and the resulting invitation to authorize again.
Do not interpret every rejection as expiration. Insufficient permission, revoked authorization, and network failure need separate handling rather than repeated refresh attempts without a known cause. Define expected states and stopping conditions so a failure can be understood instead of producing an endless loading indicator.
Decide who refreshes during concurrent requests
Imagine a page issuing several data requests that encounter the same expired state. I would use that hypothetical case to check whether refresh work is coordinated and whether an older response can overwrite newly saved state.
Implementation must follow the chosen service and SDK, but the acceptance questions can be explicit: how do waiting requests resume, when do retries stop, and how are duplicate side effects avoided before resending a write? These are application tests, not guarantees supplied by the announcement.
Make reauthorization a clear transition
When the user must authorize again, preserve only safe task context and identify unfinished actions. Do not silently replay work that could write the same change twice after a new sign-in.
For handover, include outcomes for successful refresh, failed refresh, concurrent requests, and reauthorization, alongside uncovered cases and owners. Expiring credentials bring time into authentication. Evidence that the application can recover clearly or stop safely at that boundary is the useful addition to its delivery record.