Skip to content

Commit 0831e81

Browse files
committed
Align Quick OAuth Flow with Guided OAuth Flow behavior
- In oauth-state-machine.ts - in token_request transition - ensure resource is URL type, not string - this fixes Quick flow which was sending string, while guided was using proper URL type and working
1 parent 24ef319 commit 0831e81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/lib/oauth-state-machine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const oauthTransitions: Record<OAuthStep, StateTransition> = {
177177
authorizationCode: context.state.authorizationCode,
178178
codeVerifier,
179179
redirectUri: context.provider.redirectUrl,
180-
resource: context.state.resource ?? undefined,
180+
resource: context.state.resource ? (context.state.resource instanceof URL ? context.state.resource : new URL(context.state.resource)) : undefined,
181181
});
182182

183183
context.provider.saveTokens(tokens);

0 commit comments

Comments
 (0)