Skip to content

interpolate credentialsId in the token viewer #5115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anusree-bruno
Copy link
Collaborator

This PR fixes issue #4744 where the OAuth2 token viewer incorrectly reported "No token found" when variables were used as the Token ID in OAuth 2.0 Client Credentials configuration.

Cause

The credentialsId parameter was not being interpolated with collection variables before being used to find the stored credentials. This caused a mismatch between the interpolated URL and the non-interpolated credentials ID when searching for stored OAuth2 credentials.

Changes Made

Added interpolation for credentialsId: Now properly interpolates variables in the Token ID field
Files Modified:

  • packages/bruno-app/src/components/RequestPane/Auth/OAuth2/Oauth2TokenViewer/index.js
  • packages/bruno-app/src/components/RequestPane/Auth/OAuth2/Oauth2ActionButtons/index.js

Testing

This fix resolves the scenario where:

  1. User configures OAuth 2.0 Client Credentials with a variable as Token ID (e.g., {{my_credentials_id}})
  2. User clicks "Get Access Token" - token is successfully retrieved
  3. UI now correctly displays the token details instead of showing "No token found"
Screenshot 2025-07-16 at 13 03 07

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request. - Fixes #4744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access Token display bug when using variable as Token ID
1 participant