( requested: readonly string[], supported: readonly string[] | undefined, )
| 359 | const dedupeScopes = (scopes: readonly string[]): readonly string[] => [...new Set(scopes)]; |
| 360 | |
| 361 | const intersectScopes = ( |
| 362 | requested: readonly string[], |
| 363 | supported: readonly string[] | undefined, |
| 364 | ): readonly string[] => { |
| 365 | if (!supported || supported.length === 0) return requested; |
| 366 | const supportedSet = new Set(supported); |
| 367 | return requested.filter((scope) => supportedSet.has(scope)); |
| 368 | }; |
| 369 | |
| 370 | const recordedOAuthScope = ( |
| 371 | token: OAuth2TokenResponse, |
no outgoing calls
no test coverage detected