This commit is contained in:
Taylor Wilsdon
2026-03-15 17:29:09 -04:00
parent b7365c661e
commit 6a386b4255

View File

@@ -641,8 +641,8 @@ def get_credentials(
f"[get_credentials] Found OAuth 2.1 credentials for MCP session {session_id}"
)
# Refresh expired credentials before checking scopes
if credentials.expired and credentials.refresh_token:
# Refresh invalid credentials before checking scopes
if (not credentials.valid) and credentials.refresh_token:
try:
credentials.refresh(Request())
logger.info(