baklinko
Opinion · Security

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.

A bright key sits above a small clock. A faded key sits above an orange infinity sign. A padlock stands between the two.
New keys come with a clock. Old ones still last until someone takes them away. Illustration: Baklinko

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.

QuestionNew apps from 5 January 2027Existing apps and tokens
How long a user token lastsEight hours, then the app refreshes itUnchanged
Can the developer opt out of expiryNoApps that opted out keep non-expiring tokens
If a token leaksIt stops working within hoursIt 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.

Infographic: GitHub user tokens. New tokens expire, old ones do not. New apps from 5 January: user tokens expire in eight hours; access refreshes automatically; no opt-out from expiry. Existing apps and tokens: not affected by the change; old tokens last until revoked; no deadline to switch, so far. 8 hours is the life of a new-app user token. The rule starts on 5 January 2027. 0 deadlines for existing apps. What to do: for new apps, check the refresh flow is supported; for old apps, switch to expiring tokens now; users, remove app access you do not use.
What GitHub's rule covers and what it leaves alone. Graphic: Baklinko

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.

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.