usebruno / bruno

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

oAuth2: empty Authorisation window when trying to get access token #1733

Open brki opened 8 months ago

brki commented 8 months ago

With version v1.10.0, getting the auth token is not working for me.

After clicking on "Get Access Token", I see an empty authorisation window, which stays there until I close it, at which point the message appears:

Error invoking remote method 'send-http-request': Error: Authorization window closed

The timeline just shows:

> POST
< Error

Screenshot 2024-03-08 at 15 01 02

Additional information: I am connected to my company VPN, and am trying to access the oAuth2 authorisation / token endpoints on my company network. The endpoints have a custom CA certificate. I have configured bruno to use a custom ca certificate, and this works for other APIs that use that same custom CA. I tried changing bruno settings to not verify SSL, but that did not help.

I don't know how to get more information about what is happening (e.g. details about what is happening while the authorisation window remains blank).

tskarman commented 7 months ago

In the meantime: you can open the developer tools via the View menu, option Toggle Developer Tools. The tab Console in the developer tools should give you a hint as to what's going on. Likely an incorrect auth URL.

brki commented 7 months ago

Thanks, didn't think of looking there. I don't see anything though. I click on the "Get Access Token", and nothing appears in the Console and Network tabs.

pietrygamat commented 7 months ago

I reported a separate bug specifically about OAuth flow ignoring TLS settings here #1684 . If your problem really stems from that, as a nasty workaround you could try importing the CA into the Windows directly, if you have such powers - it worked in my case.

brki commented 7 months ago

@pietrygamat, good to know there’s a workaround for windows (and probably for Linux).

I’m using MacOS, and the CA certificates that have been imported into the keychain are not used. That is a common problem with electron-based applications. I believe using the CA certificates stored in the keychain did work with Postman, so it should be possible, with some changes to the application.