bruno icon indicating copy to clipboard operation
bruno copied to clipboard

OAuth 2.0 with Client Credentials not working

Open codedog opened this issue 2 years ago • 10 comments

I have checked the following:

  • [X] I use the newest version of bruno.
  • [X] I've searched existing issues and found nothing related to my issue.

Describe the bug

I am trying to do OAuth with Client Credentials in Bruno, basically the equivalent of this Postman setup.

Postman_OAuth2 0

It works in Postman but I'm getting an error in Bruno. I can't see the actual request sent out by Bruno, and I'm not sure how I go about diagnosing this issue.

Bruno_OAuth2 0

.bru file to reproduce the bug

No response

Screenshots/Live demo link

I have included screenshots in the description above.

codedog avatar Sep 03 '24 22:09 codedog

Client ID, secret and access token URL are required fields, you skipped it only for privacy, or you actually did not configure it?

Does it work in Postman if you select client authentication to send in Request body instead of Basic Auth header (possibly the cause, as Bruno uses the latter)?

pietrygamat avatar Sep 04 '24 05:09 pietrygamat

Client ID, secret and access token are required fields, you skipped it only for privacy, or you actually did not configure it?

Does it work in Postman if you select client authentication to send in Request body instead of Basic Auth header (possibly the cause, as brune uses the latter)?

Yes, I configured those values but censored them in the screenshot.

The docs for this particular API mentions Basic Auth header, and it works. I haven't tried sending it in the body. What does the body content look like in Bruno's case? I can try it when I get back to the office.

codedog avatar Sep 04 '24 05:09 codedog

What does the body content look like in Bruno's case?

It really is hard to explain in a few words, look at #1999.

Also sending token in Basic Auth header in Bruno is not yet implemented: #2106

pietrygamat avatar Sep 04 '24 07:09 pietrygamat

Does it work in Postman if you select client authentication to send in Request body instead of Basic Auth header (possibly the cause, as Bruno uses the latter)?

I tried sending client credentials in the body in Postman, and it failed.

codedog avatar Sep 05 '24 20:09 codedog

That sounds about right, and it looks like you may have to wait for #2106 - which was promised to be delivered during this month. You may try running from the branch behind the link, and it hopefully works for you.

pietrygamat avatar Sep 05 '24 20:09 pietrygamat

@codedog

This must be working in v2. Could you configure and see? https://docs.usebruno.com/auth/oauth2-experimental/collection-level-configuration

anusree-bruno avatar Apr 03 '25 15:04 anusree-bruno

@codedog

This must be working in v2. Could you configure and see? https://docs.usebruno.com/auth/oauth2-experimental/collection-level-configuration

I manage my installation with Chocolatey. It seems the latest I can get there is 1.39.1.

codedog avatar Apr 03 '25 19:04 codedog

I would recommend using WinGet over chocolatey. You can pretty quickly install the latest version (currently 2.2.0) using winget install --id=Bruno.Bruno -e

This is working with the latest version of bruno

Image

dsl3zm avatar May 13 '25 13:05 dsl3zm

We were having some issues with chocolatey packages see here https://github.com/usebruno/bruno/issues/4459 this is resolved now.

anusree-bruno avatar May 13 '25 13:05 anusree-bruno

@codedog Hope you were able to install the latest version and get everything working. I'm closing this issue as resolved, but feel free to let us know if you’re still experiencing any problems.

anusree-bruno avatar Jul 11 '25 08:07 anusree-bruno