This commit is contained in:
Olivier Chafik 2025-06-17 11:15:38 +01:00
commit b16a415623
No known key found for this signature in database
2 changed files with 25 additions and 52 deletions

View file

@ -119,9 +119,6 @@ export function authorizationHandler({ provider, rateLimit: rateLimitConfig }: A
const { scope, code_challenge, resource } = parseResult.data;
state = parseResult.data.state;
// Pass through the resource parameter to the provider
// The provider can decide how to validate it
// Validate scopes
let requestedScopes: string[] = [];
if (scope !== undefined) {

View file

@ -93,9 +93,6 @@ export function tokenHandler({ provider, rateLimit: rateLimitConfig }: TokenHand
const { code, code_verifier, redirect_uri, resource } = parseResult.data;
// Pass through the resource parameter to the provider
// The provider can decide how to validate it
const skipLocalPkceValidation = provider.skipLocalPkceValidation;
// Perform local PKCE validation unless explicitly skipped
@ -127,9 +124,6 @@ export function tokenHandler({ provider, rateLimit: rateLimitConfig }: TokenHand
const { refresh_token, scope, resource } = parseResult.data;
// Pass through the resource parameter to the provider
// The provider can decide how to validate it
const scopes = scope?.split(" ");
const tokens = await provider.exchangeRefreshToken(client, refresh_token, scopes, resource ? new URL(resource) : undefined);
res.status(200).json(tokens);