| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hit this in production against Zoho's MCP bridge (token endpoint at Exact failure mode described in #2270:
|
Sorry, something went wrong.
|
Thanks for the PR. This has since landed via #2946. Closing this as part of a wider backlog cleanup following the v2 launch. If it's still relevant, feel free to reopen. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #2270
Per RFC 6749 Section 6, the authorization server MAY issue a new refresh token in the refresh response. When it doesn't, _handle_refresh_response overwrites the stored token as-is, discarding the existing refresh_token. After the first successful refresh, can_refresh_token() returns False and subsequent refreshes fail.
This preserves the existing refresh_token when the response omits one, using model_copy(update=...).
Also removes # pragma: no cover from _handle_refresh_response (added in a bulk coverage baseline, not intentional) and adds tests covering all branches: success with preservation, success with rotation, no prior tokens, non-200 failure, and invalid JSON.
Note: #2270 hasn't received the ready for work label yet. Submitting this early since the fix is small and self-contained. Happy to wait or adjust based on maintainer feedback.