What changes on January 5, 2027, and what stays untouched?
GitHub’s December 4, 2026 notice draws a hard line at registration date across both GitHub.com and GHE.com, leaving existing apps unaffected.
| Policy item | Through January 4, 2027 | Starting January 5, 2027 |
|---|---|---|
| New GitHub App or OAuth app user token expiry | Enabled by default with registration opt-out | Always enforced, zero opt-out |
| Apps registered before January 5, 2027 | Retain existing app setting | Unchanged; no forced migration announced |
| Previously issued user tokens | Valid under original terms | Unaffected |
| Platform coverage | GitHub.com and GHE.com | GitHub.com and GHE.com |
How do GitHub’s token lifetimes compare in seconds and plain units?
| Token type | Prefix | Documented lifetime | Plain units | Continuous 30-day refreshes |
|---|---|---|---|---|
| GitHub App installation token | ghs_ |
3,600 seconds | 1 hour | 720 refreshes |
| Expiring user access token | ghu_ |
28,800 seconds | 8 hours | 90 refreshes |
| User refresh token | ghr_ |
15,897,600 seconds | 184 days (“six months”) | Rotated every access refresh |
| Legacy non-expiring user token | ghu_ or gho_ |
Indefinite | Valid until revoked | 0 refreshes |
An always-on daemon or autonomous coding agent refreshes an expiring user token up to three times per day (24 / 8 = 3). Limiting ghu_ access tokens to 8 hours caps blast radius after a leak, yet shifts high-value security protection onto ghr_ refresh tokens that can mint fresh access tokens for up to 184 days. Note one wording split in GitHub’s documentation: OAuth docs describe the refresh ceiling as “six months without use,” while GitHub App docs state six months flat.
What exact HTTP refresh flow must new apps implement?
| Implementation detail | Required behavior |
|---|---|
| Endpoint | POST https://github.com/login/oauth/access_token |
| Request parameters | client_id, client_secret (omitted for device-flow tokens), grant_type=refresh_token, refresh_token |
| Response payload | Fresh access_token, fresh refresh_token, expires_in, and refresh_token_expires_in |
| When refresh token expires | Prompt user to sign in again through web flow or device flow |
| Pre-testing before Jan 5 | Request the offline_access scope on an existing app to receive expiring access and refresh tokens immediately |
Every refresh response rotates the refresh token itself. Integrations must atomically store both the new access_token and the new refresh_token, never overwriting only the access token.
Who needs to take action before January 5, 2027?
| Developer scenario | Required next step |
|---|---|
| Registering a new app on or after Jan 5 | Verify auth code and SDK libraries handle token refresh before registration (GitHub’s explicit guidance) |
| Maintaining an existing non-expiring app | No mandatory work; opt in voluntarily via “User-to-server token expiration” in app settings |
| Opting an existing app in | Old non-expiring tokens remain live until revoked via DELETE /applications/CLIENT_ID/token or user re-login |
| Running long-lived CLIs or AI coding agents | Encrypt refresh-token storage and automate 8-hour token rotation for unattended runs |
| Using personal access tokens (PATs) only | Unaffected; GitHub’s announcement covers GitHub Apps and OAuth apps strictly |
Developer teams auditing agent workflows and local tooling can compare coding model speeds on the Benchmarks Leaderboard, track dev hardware prices on Hot Deals, or configure a local AI workstation in the PC and Local AI Builder.
The verdict
- Teams launching new GitHub Apps, OAuth apps, CLIs, or AI agents in 2027: Test refresh-token persistence now using
offline_accessso users and unattended jobs do not hit sudden 8-hour sign-outs starting January 5. - Maintainers of pre-2027 integrations: Nothing breaks automatically on January 5, though opting in and revoking old
gho_/ghu_tokens removes indefinite credential exposure. - Personal access token users: No change required from this policy update.
The catch: Legacy apps retain non-expiring user tokens that GitHub itself warns remain exploitable indefinitely if leaked; the security upgrade only reaches existing apps whose owners manually opt in and revoke legacy tokens.
Quick answers
Does GitHub’s January 5, 2027 rule break existing GitHub Apps or OAuth apps?
No. Apps registered before January 5, 2027 keep their current token expiration setting, and already-issued tokens remain valid with no forced switch announced.
How long do new GitHub user access tokens and refresh tokens last?
Expiring user access tokens (ghu_) live 28,800 seconds (8 hours), and refresh tokens (ghr_) live 15,897,600 seconds (184 days, described by GitHub as six months).
How can developers test the 8-hour token refresh flow before January 5, 2027?
Request the offline_access scope from an existing app to receive expiring access and refresh tokens, then confirm the app persists both the new access_token and rotated refresh_token returned by POST https://github.com/login/oauth/access_token.
Are GitHub personal access tokens affected by the January 5, 2027 rule?
No. GitHub’s December 4, 2026 changelog notice applies strictly to newly registered GitHub Apps and OAuth apps on GitHub.com and GHE.com.