Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

fix(oauth_proxy): :bug: add _extra_token_params as kwargs in refresh_token call (#2387)

EdenTrainorCDLdffaa0bfcea9
diff --git a/src/fastmcp/server/auth/oauth_proxy.py b/src/fastmcp/server/auth/oauth_proxy.py
index 8cfa46d66..516fd592e 100644
--- a/src/fastmcp/server/auth/oauth_proxy.py
+++ b/src/fastmcp/server/auth/oauth_proxy.py
@@ -1326,6 +1326,7 @@ class OAuthProxy(OAuthProvider):
url=self._upstream_token_endpoint,
refresh_token=upstream_token_set.refresh_token,
scope=" ".join(scopes) if scopes else None,
+ **self._extra_token_params,
)
logger.debug("Successfully refreshed upstream token")
except Exception as e: