MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / buildAuthorizeUrl

Function buildAuthorizeUrl

packages/cli/src/auth/oauth.ts:264–281  ·  view source on GitHub ↗
(args: {
  clientId: string;
  redirectUri: string;
  scope: string;
  state: string;
  challenge: string;
})

Source from the content-addressed store, hash-verified

262}
263
264function buildAuthorizeUrl(args: {
265 clientId: string;
266 redirectUri: string;
267 scope: string;
268 state: string;
269 challenge: string;
270}): string {
271 const params = new URLSearchParams({
272 response_type: "code",
273 client_id: args.clientId,
274 redirect_uri: args.redirectUri,
275 scope: args.scope,
276 state: args.state,
277 code_challenge: args.challenge,
278 code_challenge_method: "S256",
279 });
280 return `${authorizeEndpoint()}?${params.toString()}`;
281}
282
283async function exchangeCodeForTokens(args: {
284 clientId: string;

Callers 1

Calls 1

authorizeEndpointFunction · 0.85

Tested by

no test coverage detected