diff --git a/packages/bruno-app/src/components/RequestPane/Auth/index.js b/packages/bruno-app/src/components/RequestPane/Auth/index.js index 51a1450f1e..3a988b4375 100644 --- a/packages/bruno-app/src/components/RequestPane/Auth/index.js +++ b/packages/bruno-app/src/components/RequestPane/Auth/index.js @@ -6,8 +6,9 @@ import BearerAuth from './BearerAuth'; import BasicAuth from './BasicAuth'; import DigestAuth from './DigestAuth'; import StyledWrapper from './StyledWrapper'; -import { humanizeRequestAuthMode } from 'utils/collections/index'; +import { humanizeRequestAuthMode } from 'utils/collections'; import OAuth2 from './OAuth2/index'; +import CredentialsPreview from './OAuth2/CredentialsPreview'; const Auth = ({ item, collection }) => { const authMode = item.draft ? get(item, 'draft.request.auth.mode') : get(item, 'request.auth.mode'); @@ -34,24 +35,13 @@ const Auth = ({ item, collection }) => { } case 'inherit': { return ( -
- {collectionAuth?.mode === 'oauth2' ? ( -
-
-
Collection level auth is:
-
{humanizeRequestAuthMode(collectionAuth?.mode)}
-
-
- Note: You need to use scripting to set the access token in the request headers. -
-
- ) : ( - <> -
Auth inherited from the Collection:
-
{humanizeRequestAuthMode(collectionAuth?.mode)}
- - )} -
+ <> +
+
Auth inherited from the Collection:
+
{humanizeRequestAuthMode(collectionAuth?.mode)}
+
+ {collectionAuth?.mode === 'oauth2' && } + ); } } diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js index 2cfe63de91..1175f49964 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-request.js @@ -216,6 +216,9 @@ const setAuthHeaders = (axiosRequest, request, collectionRoot) => { password: get(collectionAuth, 'digest.password') }; break; + case 'oauth2': + request.auth = collectionAuth; + break; } }