From 3fc0b0a6684d882dc9f0f968e3265cf554cb18df Mon Sep 17 00:00:00 2001 From: lohxt1 Date: Tue, 11 Feb 2025 12:27:58 +0530 Subject: [PATCH] oauth2 improvements - collection import default type --- packages/bruno-app/src/utils/importers/postman-collection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/utils/importers/postman-collection.js b/packages/bruno-app/src/utils/importers/postman-collection.js index 72e57e942..f7529eced 100644 --- a/packages/bruno-app/src/utils/importers/postman-collection.js +++ b/packages/bruno-app/src/utils/importers/postman-collection.js @@ -435,9 +435,9 @@ const importPostmanV2CollectionItem = (brunoParent, item, parentAuth, options) = 'client_credentials': 'client_credentials', 'password_credentials': 'password_credentials' } - const grantType = oauth2GrantTypeMaps[findValueUsingKey('grant_type')]; + const grantType = oauth2GrantTypeMaps[findValueUsingKey('grant_type')] || 'authorization_code'; if (grantType) { - brunoRequestItem.request.auth.mode = 'oauth2'; + brunoRequestItem.request.auth.mode = 'oauth2'; switch(grantType) { case 'authorization_code': brunoRequestItem.request.auth.oauth2 = {