(args: {
clientId: string;
redirectUri: string;
scope: string;
state: string;
challenge: string;
})
| 262 | } |
| 263 | |
| 264 | function 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 | |
| 283 | async function exchangeCodeForTokens(args: { |
| 284 | clientId: string; |
no test coverage detected