GitHub requires expiring tokens for new apps from 5 January 2027. Old apps keep theirs
GitHub is closing the option that let new apps hold a user's access for ever. It is the right default. The tokens most likely to cause harm are the ones already issued, and the change leaves those alone.

GitHub will require every newly registered app to use expiring user tokens from 5 January 2027, it said on 4 December. An access token is a string of characters that lets an app act on a user's behalf without their password. Under the new rule a token lasts eight hours and is then refreshed automatically. Apps and tokens that already exist are not affected. This is a sound change that costs users nothing. Its limit is that it protects future apps and leaves today's long-lived tokens in place.
What is GitHub changing?
GitHub is removing an opt-out. Expiring tokens were already the default for new apps, but a developer could choose tokens that never expired. From 5 January 2027 that choice disappears for new registrations on GitHub.com and GHE.com.
| Question | New apps from 5 January 2027 | Existing apps and tokens |
|---|---|---|
| How long a user token lasts | Eight hours, then the app refreshes it | Unchanged |
| Can the developer opt out of expiry | No | Apps that opted out keep non-expiring tokens |
| If a token leaks | It stops working within hours | It works until someone revokes it |
Why does an expiring token matter?
An expiring token matters because stolen access stops being permanent. GitHub puts it plainly: a token that never expires stays valid until someone revokes it, so a leaked one can be used indefinitely. Tokens leak in ordinary ways, such as a file committed by mistake or a breached third-party service.
With an eight-hour life, a leaked token is useful to an attacker for a working day at most. The app renews access in the background, so the user does not have to sign in again.
The refresh token is the new thing to guard. It is what lets an app obtain fresh access, so an app that stores it carelessly has moved the problem, not removed it. GitHub's post does not describe how long refresh tokens last or how they are protected.

What should developers and users do?
Developers and users each have a short task. - Developers planning a new app should confirm their sign-in library supports the refresh flow before registering. - Developers with older apps should switch to expiring tokens now. Nothing forces it, and that is the reason to do it. - Users should open their GitHub settings, review the apps that have access and remove any they no longer use.
Sponsored · Hostinger
20% off your first term on HostingerCloud, VPS and agency hosting. The discount is applied automatically through this link.Get the offerBaklinko is a Hostinger partner and earns a commission if you buy through this link.
The best case against this view
The strongest objection is that GitHub cannot safely do more at once. Forcing expiry on existing apps would break integrations that were written without a refresh flow, some of them unmaintained and still in use. Starting with new registrations is the usual way to raise a standard without an outage. A dated rule for new apps today makes a later deadline for old ones easier to set.
That is a good reason for the order. It is a weaker reason for having no second date. The apps that opted out of expiry are the ones holding the tokens this rule was written to prevent.
The verdict
GitHub has made the safe option the only option for new apps, and that is correct. It should now publish a deadline for existing apps to move, with enough notice for maintainers to adapt. Until then, the practical protection is the one in every user's settings page: remove access that is no longer needed.
This is opinion and analysis, not investment or professional advice. Facts are attributed to the sources named in the piece. See our editorial policy and disclaimer, or request a correction.
Get the day's tech news by email
One short email a day with the stories that matter. Free.
Unsubscribe anytime. See the privacy policy.





