MCPcopy Index your code
hub / github.com/modelcontextprotocol/typescript-sdk / prepareAuthorizationCodeRequest

Function prepareAuthorizationCodeRequest

src/client/auth.ts:1194–1205  ·  view source on GitHub ↗
(
    authorizationCode: string,
    codeVerifier: string,
    redirectUri: string | URL
)

Source from the content-addressed store, hash-verified

1192 * @returns URLSearchParams for the authorization_code grant
1193 */
1194export function prepareAuthorizationCodeRequest(
1195 authorizationCode: string,
1196 codeVerifier: string,
1197 redirectUri: string | URL
1198): URLSearchParams {
1199 return new URLSearchParams({
1200 grant_type: 'authorization_code',
1201 code: authorizationCode,
1202 code_verifier: codeVerifier,
1203 redirect_uri: String(redirectUri)
1204 });
1205}
1206
1207/**
1208 * Internal helper to execute a token request with the given parameters.

Callers 2

exchangeAuthorizationFunction · 0.85
fetchTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…