Skip to content

Commit d43766e

Browse files
authored
Log missing refresh token response (#568)
1 parent 1349fae commit d43766e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • packages/mcp-cloudflare/src/server/oauth

‎packages/mcp-cloudflare/src/server/oauth/helpers.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ export async function tokenExchangeCallback(
276276
);
277277
}
278278

279+
if (!tokenResponse.refresh_token) {
280+
logIssue("[oauth] Upstream refresh response missing refresh_token", {
281+
loggerScope: ["cloudflare", "oauth", "refresh"],
282+
});
283+
return undefined;
284+
}
285+
279286
// Return the updated props with new tokens and TTL
280287
return {
281288
// This updates ctx.props

0 commit comments

Comments
 (0)