mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-05 08:14:32 +00:00
The MCP SDK knows a token's expiry only when it obtained the token in the same process. A worker or a restarted API loading tokens from the connection sent an expired one, got a 401 and asked the owner to sign in again. The expiry is now saved with the tokens and handed back to the SDK, which then renews the token with its refresh token first; a token saved before expiries were kept is renewed once. A sign-in that cannot be renewed raises MCPReauthorizationRequired.