{"record":{"id":"6e54121756d348f9","repo":"Kong/insomnia","slug":"unknown-response-type-for-oauth2-inputresponse","errorCode":null,"errorMessage":"unknown response type for oauth2: \"${inputResponseType}\", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | ''","messagePattern":"unknown response type for oauth2: \"(.+?)\", it could be: 'code' \\| 'id_token' \\| 'id_token token' \\| 'none' \\| 'token' \\| ''","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/auth.ts","lineNumber":515,"sourceCode":"          }\n          case 'refresh_token': {\n            return 'refresh_token';\n          }\n          default: {\n            throw new Error(\n              `auth transforming(fromPreRequestAuth): unknown auth grant type for oauth2: ${inputGrantType}`,\n            );\n          }\n        }\n      })();\n\n      const responseType = ((): OAuth2ResponseType => {\n        const inputResponseType = findValueInOauth2Options('response_type', authObj.oauth2);\n        // responseType is currently always set to '' in our request auth model, this should be investigated what is correct to be set\n        if (['code', 'id_token', 'id_token token', 'none', 'token', ''].includes(inputResponseType)) {\n          return inputResponseType as OAuth2ResponseType;\n        }\n        throw new Error(\n          `unknown response type for oauth2: \"${inputResponseType}\", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | ''`,\n        );\n      })();\n\n      return {\n        type: 'oauth2',\n        disabled: findValueInOauth2Options('disabled', authObj.oauth2) === 'true',\n        grantType: grantType,\n        authorizationUrl: findValueInOauth2Options('authUrl', authObj.oauth2),\n        accessTokenUrl: findValueInOauth2Options('accessTokenUrl', authObj.oauth2),\n        clientId: findValueInOauth2Options('clientId', authObj.oauth2),\n        clientSecret: findValueInOauth2Options('clientSecret', authObj.oauth2),\n        scope: findValueInOauth2Options('scope', authObj.oauth2),\n        code: findValueInOauth2Options('code_verifier', authObj.oauth2),\n        accessToken: findValueInOauth2Options('accessToken', authObj.oauth2),\n        pkceMethod: findValueInOauth2Options('challengeAlgorithm', authObj.oauth2),\n        usePkce: findValueInOauth2Options('grant_type', authObj.oauth2) === 'authorization_code_with_pkce',\n        username: findValueInOauth2Options('username', authObj.oauth2),","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/auth.ts#L497-L533","documentation":"Error \"unknown response type for oauth2: \"${inputResponseType}\", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | ''\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:515 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}