From be536f0ca3d1caa36c088625947ddc416a37440a Mon Sep 17 00:00:00 2001 From: Umut Keltek <35880258+umutkeltek@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:41:13 +0300 Subject: [PATCH] fix(common): persist OAuth2 code challenge method selection (#5921) Co-authored-by: Anwarul Islam --- .../src/composables/oauth2/useOAuth2GrantTypes.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-common/src/composables/oauth2/useOAuth2GrantTypes.ts b/packages/hoppscotch-common/src/composables/oauth2/useOAuth2GrantTypes.ts index f46fc923..ea62fc29 100644 --- a/packages/hoppscotch-common/src/composables/oauth2/useOAuth2GrantTypes.ts +++ b/packages/hoppscotch-common/src/composables/oauth2/useOAuth2GrantTypes.ts @@ -196,7 +196,10 @@ export const useOAuth2GrantTypes = ( } : null, (value) => { - if (!("codeVerifierMethod" in auth.value.grantTypeInfo) || !value) { + if ( + !value || + auth.value.grantTypeInfo.grantType !== "AUTHORIZATION_CODE" + ) { return }