Skip to content

Commit 4b79b49

Browse files
committed
fix: Add missing grant_types_supported to OAuth server metadata
1 parent b405144 commit 4b79b49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/servers/auth/lib/mcp-auth.oauth-auth-server-metadata-function.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface CognitoConfiguration {
77
interface OAuthServerMetadata {
88
[key: string]: any;
99
code_challenge_methods_supported?: string[];
10+
grant_types_supported?: string[];
1011
}
1112

1213
export const handler = async (
@@ -30,10 +31,11 @@ export const handler = async (
3031
// Fetch Cognito's OpenID configuration
3132
const cognitoConfig = await fetchJson(cognitoConfigUrl);
3233

33-
// Add the missing code_challenge_methods_supported field
34+
// Add the missing fields
3435
const modifiedConfig: OAuthServerMetadata = {
3536
...cognitoConfig,
3637
code_challenge_methods_supported: ["S256"],
38+
grant_types_supported: ["authorization_code", "refresh_token"],
3739
};
3840

3941
return {

0 commit comments

Comments
 (0)