diff --git a/packages/bruno-app/src/components/RequestPane/Auth/index.js b/packages/bruno-app/src/components/RequestPane/Auth/index.js
index 730facf69b..c959d5faf6 100644
--- a/packages/bruno-app/src/components/RequestPane/Auth/index.js
+++ b/packages/bruno-app/src/components/RequestPane/Auth/index.js
@@ -34,12 +34,13 @@ const Auth = ({ item, collection }) => {
}
case 'inherit': {
return (
-
+
Auth inherited from the Collection:
{humanizeRequestAuthMode(collectionAuth?.mode)}
);
}
+ }
};
return (
@@ -51,4 +52,5 @@ const Auth = ({ item, collection }) => {
);
};
+
export default Auth;
diff --git a/packages/bruno-cli/src/runner/prepare-request.js b/packages/bruno-cli/src/runner/prepare-request.js
index c2e5b13f76..b6c9e74e02 100644
--- a/packages/bruno-cli/src/runner/prepare-request.js
+++ b/packages/bruno-cli/src/runner/prepare-request.js
@@ -31,12 +31,19 @@ const prepareRequest = (request, collectionRoot) => {
headers: headers
};
- // Authentication
- // A request can override the collection auth with another auth
- // But it cannot override the collection auth with no auth
- // We will provide support for disabling the auth via scripting in the future
+ /**
+ * 27 Feb 2024:
+ * ['inherit', 'none'].includes(request.auth.mode)
+ * We are mainitaining the old behavior where 'none' used to inherit the collection auth.
+ *
+ * Very soon, 'none' will be treated as no auth and 'inherit' will be the only way to inherit collection auth.
+ * We will request users to update their collection files to use 'inherit' instead of 'none'.
+ * Don't want to break ongoing CI pipelines.
+ *
+ * Hoping to remove this by 1 April 2024.
+ */
const collectionAuth = get(collectionRoot, 'request.auth');
- if (collectionAuth && request.auth.mode == 'inherit') {
+ if (collectionAuth && ['inherit', 'none'].includes(request.auth.mode)) {
if (collectionAuth.mode === 'basic') {
axiosRequest.auth = {
username: get(collectionAuth, 'basic.username'),
diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js
index c1ec520a97..b4ec49d5ba 100644
--- a/packages/bruno-electron/src/ipc/network/prepare-request.js
+++ b/packages/bruno-electron/src/ipc/network/prepare-request.js
@@ -29,13 +29,20 @@ const parseFormData = (datas, collectionPath) => {
return form;
};
-// Authentication
-// A request can override the collection auth with another auth
-// But it cannot override the collection auth with no auth
-// We will provide support for disabling the auth via scripting in the future
+/**
+ * 27 Feb 2024:
+ * ['inherit', 'none'].includes(request.auth.mode)
+ * We are mainitaining the old behavior where 'none' used to inherit the collection auth.
+ *
+ * Very soon, 'none' will be treated as no auth and 'inherit' will be the only way to inherit collection auth.
+ * We will request users to update their collection files to use 'inherit' instead of 'none'.
+ * Don't want to break ongoing CI pipelines.
+ *
+ * Hoping to remove this by 1 April 2024.
+ */
const setAuthHeaders = (axiosRequest, request, collectionRoot) => {
const collectionAuth = get(collectionRoot, 'request.auth');
- if (collectionAuth && request.auth.mode == 'inherit') {
+ if (collectionAuth && ['inherit', 'none'].includes(request.auth.mode)) {
switch (collectionAuth.mode) {
case 'awsv4':
axiosRequest.awsv4config = {