Skip to content

OAuth: answer a used refresh token again for ten minutes and log invalid_grant refusals - #35

Merged
ankurmans merged 1 commit into
mainfrom
fix/oauth-refresh-replay
Nov 1, 2026
Merged

ankurmans merged 1 commit into
mainfrom
fix/oauth-refresh-replay

Conversation

@ankurmans

Copy link
Copy Markdown
Owner

Refresh tokens rotate on use. Sessions that share one MCP login can present a token another one already used; past Better Auth's 30 second replay window the server drops every token of the login and every session has to reconnect. This raises the window to 10 minutes and logs each invalid_grant refusal (grant type and client id, never a token) so a recurrence can be traced. Tests cover the window and the refusal path.

@ankurmans
ankurmans merged commit e061e24 into main Nov 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant