fix: gRPC oauth2 call is not taking ssl cert and proxy config#6313
fix: gRPC oauth2 call is not taking ssl cert and proxy config#6313bijin-bruno merged 3 commits intousebruno:mainfrom
Conversation
WalkthroughCentralized OAuth2 token handling was extracted into a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/bruno-electron/src/ipc/network/cert-utils.js(1 hunks)packages/bruno-electron/src/ipc/network/grpc-event-handlers.js(3 hunks)packages/bruno-electron/src/ipc/network/prepare-grpc-request.js(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions:() => {}
No space between function name and parentheses:func()notfunc ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments
Files:
packages/bruno-electron/src/ipc/network/cert-utils.jspackages/bruno-electron/src/ipc/network/grpc-event-handlers.jspackages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.299Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
📚 Learning: 2025-12-02T07:24:50.299Z
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.299Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
Applied to files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧬 Code graph analysis (1)
packages/bruno-electron/src/ipc/network/cert-utils.js (1)
packages/bruno-cli/src/runner/run-single-request.js (2)
hostRegex(76-76)hostRegex(261-261)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Linux
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Windows
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: CLI Tests
🔇 Additional comments (5)
packages/bruno-electron/src/ipc/network/cert-utils.js (1)
70-70: Good defensive guard.The null check prevents potential runtime errors when
requestUrlis undefined or null before calling.match().packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (1)
127-127: LGTM on named export.The named export for
configureRequestproperly extends the module's public API while maintaining backward compatibility with the default export.packages/bruno-electron/src/ipc/network/grpc-event-handlers.js (3)
11-11: LGTM on import.The import correctly destructures the named export from
prepare-grpc-request.
57-66: Correct integration of OAuth2 configuration.The
configureRequestcall is properly placed after request preparation and certificate configuration, with correct parameter passing and awaiting.
205-214: Consistent OAuth2 configuration in reflection handler.The
configureRequestintegration follows the same correct pattern as the start-connection handler.
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
Outdated
Show resolved
Hide resolved
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
Outdated
Show resolved
Hide resolved
d47c442 to
8177f2f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (3)
21-63: Token placement logic is duplicated across grant typesFor
authorization_code,client_credentials, andpassword, the code to:
- set
grpcRequest.oauth2Credentials, and- place the access token into either the
Authorizationheader or the URL queryis effectively identical, differing only in how
credentialsare fetched.You can reduce duplication and potential divergence by extracting a small helper, e.g.:
+const applyOAuth2Token = (grpcRequest, request, { + credentials, + oauth2Url, + credentialsId, + debugInfo, + tokenPlacement, + tokenHeaderPrefix, + tokenQueryKey +}) => { + grpcRequest.oauth2Credentials = { + credentials, + url: oauth2Url, + collectionUid: request.collectionUid || grpcRequest.collectionUid, + credentialsId, + debugInfo, + folderUid: request.oauth2Credentials?.folderUid + }; + + if (tokenPlacement === 'header') { + grpcRequest.headers['Authorization'] = `${tokenHeaderPrefix} ${credentials?.access_token}`; + } else { + try { + const url = new URL(grpcRequest.url); + url.searchParams.set(tokenQueryKey, credentials?.access_token); + grpcRequest.url = url.toString(); + } catch (error) { + console.error('Failed to parse URL for OAuth2 token placement', error, grpcRequest.url, tokenQueryKey); + } + } +};Then each case becomes a focused “fetch credentials” call plus a single
applyOAuth2Token(...). This keeps behavior consistent if you tweak token placement in the future.
26-26: Use strict equality (===) fortokenPlacementchecksThe three checks
if (tokenPlacement == 'header') {rely on loose equality.
tokenPlacementis a configuration value and should be compared strictly to avoid silent coercion and to align with the project’s JS style guidelines.Suggested change:
- if (tokenPlacement == 'header') { + if (tokenPlacement === 'header') {Apply the same replacement at Lines 40 and 54.
Also applies to: 40-40, 54-54
29-33: Emptycatchblocks hide URL parsing problemsAll three
catchblocks aroundnew URL(grpcRequest.url)are empty:} catch (error) { }This will silently swallow misconfigurations or invalid URLs, making it hard to debug why the token is not being added to the URL.
At minimum, log the error (or use the module’s logger if there is one):
- } catch (error) { } + } catch (error) { + console.error( + 'Failed to parse URL for OAuth2 token placement', + error, + grpcRequest.url, + tokenQueryKey + ); + }Apply a similar change to the two other
catchblocks.Also applies to: 43-47, 57-61
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/bruno-electron/src/ipc/network/cert-utils.js(1 hunks)packages/bruno-electron/src/ipc/network/grpc-event-handlers.js(3 hunks)packages/bruno-electron/src/ipc/network/prepare-grpc-request.js(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/bruno-electron/src/ipc/network/grpc-event-handlers.js
- packages/bruno-electron/src/ipc/network/cert-utils.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
📚 Learning: 2025-12-02T07:24:50.311Z
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
Applied to files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧬 Code graph analysis (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (4)
packages/bruno-electron/src/ipc/network/index.js (10)
configureRequest(101-289)request(326-326)collection(146-146)envVars(298-298)processEnvVars(307-307)certsAndProxyConfig(117-126)certsAndProxyConfig(147-147)requestCopy(162-162)requestCopy(163-163)interpolateVars(20-20)packages/bruno-electron/src/ipc/network/interpolate-vars.js (1)
interpolateVars(21-365)packages/bruno-electron/src/utils/oauth2.js (1)
getOAuth2TokenUsingAuthorizationCode(131-292)packages/bruno-electron/src/ipc/network/grpc-event-handlers.js (1)
prepareGrpcRequest(10-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Linux
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Windows
- GitHub Check: CLI Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (1)
30-30: Consider adding JSDoc documentation.The
configureRequestfunction is exported and has a complex signature with 8 parameters. Adding JSDoc would help consumers understand its purpose and side effects, especially that it mutatesgrpcRequestin place.Add documentation like this:
+/** + * Configures OAuth2 authentication for a gRPC request by fetching tokens and placing them in headers or URL. + * Mutates the grpcRequest object in place by setting oauth2Credentials and adding the access token. + * + * @param {Object} grpcRequest - The gRPC request object to configure (mutated in place) + * @param {Object} request - The original request object with OAuth2 configuration + * @param {Object} collection - The collection containing the request + * @param {Object} envVars - Environment variables + * @param {Object} runtimeVariables - Runtime variables + * @param {Object} processEnvVars - Process environment variables + * @param {Object} promptVariables - Prompt variables + * @param {Object} certsAndProxyConfig - SSL certificates and proxy configuration + * @returns {Promise<void>} + */ const configureRequest = async (grpcRequest, request, collection, envVars, runtimeVariables, processEnvVars, promptVariables, certsAndProxyConfig) => {
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
📚 Learning: 2025-12-02T07:24:50.311Z
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
Applied to files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧬 Code graph analysis (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (2)
packages/bruno-electron/src/ipc/network/interpolate-vars.js (2)
url(153-153)interpolateVars(21-365)packages/bruno-electron/src/utils/oauth2.js (3)
getOAuth2TokenUsingAuthorizationCode(131-292)getOAuth2TokenUsingClientCredentials(357-480)getOAuth2TokenUsingPasswordCredentials(484-629)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Playwright E2E Tests
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
- GitHub Check: SSL Tests - Windows
- GitHub Check: CLI Tests
- GitHub Check: Unit Tests
🔇 Additional comments (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (1)
58-117: Good refactoring – OAuth2 handling is now cleanly separated.The refactoring successfully extracts OAuth2 token handling into a dedicated
configureRequestfunction while keepingprepareGrpcRequestfocused on request preparation. The export structure allows event handlers to call both functions in sequence.
| const placeOAuth2Token = (grpcRequest, credentials, tokenPlacement, tokenHeaderPrefix, tokenQueryKey) => { | ||
| if (tokenPlacement === 'header') { | ||
| grpcRequest.headers['Authorization'] = `${tokenHeaderPrefix} ${credentials?.access_token}`; | ||
| } else { | ||
| try { | ||
| const url = new URL(grpcRequest.url); | ||
| url?.searchParams?.set(tokenQueryKey, credentials?.access_token); | ||
| grpcRequest.url = url?.toString(); | ||
| } catch (error) { | ||
| console.error('Failed to parse URL for OAuth2 token placement:', error); | ||
| } | ||
| } | ||
| }; |
There was a problem hiding this comment.
Add validation for undefined tokens and configuration values.
The function doesn't validate that credentials?.access_token, tokenHeaderPrefix, or tokenQueryKey are defined before using them. This could result in invalid Authorization headers like "undefined undefined" or malformed URL query parameters.
Apply this diff to add validation:
const placeOAuth2Token = (grpcRequest, credentials, tokenPlacement, tokenHeaderPrefix, tokenQueryKey) => {
+ if (!credentials?.access_token) {
+ console.warn('OAuth2 access token is missing, skipping token placement');
+ return;
+ }
+
if (tokenPlacement === 'header') {
+ if (!tokenHeaderPrefix) {
+ console.warn('OAuth2 tokenHeaderPrefix is missing, using default "Bearer"');
+ }
grpcRequest.headers['Authorization'] = `${tokenHeaderPrefix || 'Bearer'} ${credentials.access_token}`;
} else {
+ if (!tokenQueryKey) {
+ console.warn('OAuth2 tokenQueryKey is missing, skipping query parameter placement');
+ return;
+ }
try {
const url = new URL(grpcRequest.url);
- url?.searchParams?.set(tokenQueryKey, credentials?.access_token);
+ url.searchParams.set(tokenQueryKey, credentials.access_token);
grpcRequest.url = url?.toString();
} catch (error) {
console.error('Failed to parse URL for OAuth2 token placement:', error);
}
}
};There was a problem hiding this comment.
I think it is better to not to have these checks, cause then users will be able to debug this, they can inspect the url, headers and see , it is sending undefined or something, your thoughts
There was a problem hiding this comment.
@sanish-bruno, that's a fair point! In a developer tool like Bruno, having the actual values (even if undefined) visible in the request helps users identify configuration issues more quickly than silent fallbacks would. I agree with your approach—letting the undefined values through makes debugging easier for users. Thanks for the clarification!
🧠 Learnings used
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (2)
20-23: Remove unnecessary optional chaining.The
urlobject created bynew URL()always has asearchParamsproperty, so the optional chaining on lines 22-23 is redundant. ThetoString()call on line 23 also doesn't need optional chaining.Apply this diff:
try { const url = new URL(grpcRequest.url); - url?.searchParams?.set(tokenQueryKey, credentials?.access_token); - grpcRequest.url = url?.toString(); + url.searchParams.set(tokenQueryKey, credentials?.access_token); + grpcRequest.url = url.toString(); } catch (error) { console.error('Failed to parse URL for OAuth2 token placement:', error); }
36-55: Add default case for unknown grant types.The switch statement doesn't handle unknown or undefined grant types. Consider adding a default case to log a warning when an unsupported grant type is encountered, which would aid debugging.
Apply this diff:
case 'password': interpolateVars(requestCopy, envVars, runtimeVariables, processEnvVars, promptVariables); ({ credentials, url: oauth2Url, credentialsId, debugInfo } = await getOAuth2TokenUsingPasswordCredentials({ request: requestCopy, collectionUid: collection.uid, certsAndProxyConfig })); grpcRequest.oauth2Credentials = { credentials, url: oauth2Url, collectionUid: collection.uid, credentialsId, debugInfo, folderUid: request.oauth2Credentials?.folderUid }; placeOAuth2Token(grpcRequest, credentials, tokenPlacement, tokenHeaderPrefix, tokenQueryKey); break; + default: + console.warn(`Unsupported OAuth2 grant type for gRPC: ${grantType}`); + break; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
📚 Learning: 2025-12-02T07:24:50.311Z
Learnt from: bijin-bruno
Repo: usebruno/bruno PR: 6263
File: packages/bruno-requests/src/auth/oauth2-helper.ts:249-249
Timestamp: 2025-12-02T07:24:50.311Z
Learning: In OAuth2 Basic Auth headers for Bruno, clientSecret is optional and can be omitted. When constructing the Authorization header in `packages/bruno-requests/src/auth/oauth2-helper.ts`, use `clientSecret || ''` instead of `clientSecret!` to properly handle cases where only clientId is provided, per community requests.
Applied to files:
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js
🧬 Code graph analysis (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (2)
packages/bruno-electron/src/ipc/network/interpolate-vars.js (2)
url(153-153)interpolateVars(21-365)packages/bruno-electron/src/utils/oauth2.js (3)
getOAuth2TokenUsingAuthorizationCode(131-292)getOAuth2TokenUsingClientCredentials(357-480)getOAuth2TokenUsingPasswordCredentials(484-629)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
- GitHub Check: CLI Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
🔇 Additional comments (1)
packages/bruno-electron/src/ipc/network/prepare-grpc-request.js (1)
63-122: Clean refactoring of OAuth2 handling.The separation of concerns between
prepareGrpcRequest(building the base request with auth config) andconfigureRequest(fetching and applying OAuth2 tokens) is well-structured. This allows the event handlers to control when OAuth2 token fetching occurs while passing the necessarycertsAndProxyConfig.
certs and proxy config based on oauth2 token and refresh urls instead of resource url
#6164
Description
Jira
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.