OAuth tokens unexpectedly revoked with max_for_app on every login #198354
Replies: 1 comment
-
|
Hi Jihye, What you're describing does not match the documented behavior for standard GitHub OAuth Apps, where up to 10 active tokens can exist per user/application/scope combination before the oldest token is revoked. A few observations:
To help narrow this down, I would recommend checking:
If the issue only occurs for accounts associated with a specific enterprise domain while standard accounts retain multiple tokens, that would strongly suggest an enterprise-specific policy or GitHub-side restriction. Since the behavior appears to differ from the public documentation, opening a GitHub Support ticket with:
would likely be the best path to determine whether this is intended behavior, an enterprise policy interaction, or a platform bug. I'd be very interested to hear what GitHub Support confirms, as this behavior appears inconsistent with the documented 10-token limit. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Apps
Body
Hello,
I am running into an issue where GitHub unexpectedly revokes and regenerates OAuth app tokens on every single login attempt, specifically for a certain enterprise email domain.
According to the GitHub documentation (https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#creating-multiple-tokens-for-oauth-apps), GitHub allows up to 10 tokens to be issued per user/application/scope combination. If the 10-token limit is exceeded, the oldest token should be revoked.
However, instead of maintaining multiple tokens up to the documented limit of 10, each new login triggers a sequence of
oauth_access.create,oauth_access.destroy, andoauth_access.regenerateactions. This causes unexpected logouts and session expirations for users who work across multiple devices. It appears that the existing active token is being destroyed immediately upon a new login, rather than destroying the oldest one.I tracked this behavior via the GitHub Security log (https://github.com/settings/security-log). When a GitHub account under the affected enterprise email domain logs in, the following event occurs:
Related Link
I found a GitHub CLI issue that mentions a similar unexpected behavior regarding token management: cli/cli#12490
Questions
Thanks,
Jihye
Beta Was this translation helpful? Give feedback.
All reactions