usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.83k stars 1.29k forks source link

Auth: inherit does not work for Oauth2 requests #2494

Open Unipesa-Deicosaic opened 5 months ago

Unipesa-Deicosaic commented 5 months ago

I have checked the following:

Describe the bug

  1. Try and use "Oauth2"

Setup collection auth to be Oauth2. Click buttons "Save" and "Get Access Token".

Setup request auth to be "inherit"

Send request.

Expected result: A "Bearer" header appended to a request --- or, at least, some global variable is provided to reach the key Actual result: No extra header, no usable variable in bru, req, or anywhere

  1. Try and use "Bearer Token"

Setup collection auth to be Bearer Token. Click "Save"

Result: A "Bearer" header appended to a request, and there is no need to search for any variable, since it is already used properly.

Summary

Please provide some way to inherit OAuth2 of the collection in the request, where exporting a variable with JWT to scripting environment would probably be the best solution. Right now there is literally no way to use the JWT received by collection in the request. The value of the JWT is not exported in any way and JWT is not accessible through any accessors in the scripting environment.

Thank you.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

See explanation above. I am wary of inadvertently revealing service credentials if i do any screenshots or livecasts.

pietrygamat commented 5 months ago

This is a duplicate of #1704