Bruno 4.1.0 - OAuth2 state mismatch: the returned state does not match the issued state.
Internal - [BRU-4477]
I have checked the following:
- [x] I have searched existing issues and found nothing related to my issue.
This bug is:
- [x] Making Bruno unusable for me.
- [ ] Slowing me down but I'm able to continue working.
- [ ] Annoying.
- [x] This feature was working in a previous version but is broken in the current release.
Bruno version
4.1.0
💻 Operating System
macOS
Specific OS Version / Distro
No response
🐞 Describe the bug
Using Bruno 3.5.3 with collection level Oauth 2.0 authentication for Authorization code and the built in browser I can successfully get the token as expected and use it to send API requests.
After upgrading to Bruno 4.1.0 every time I try to get the token using the same settings in the same collection I get the error.
"OAuth2 state mismatch: the returned state does not match the issued state."
I am unable to get the token and therefore unable to use Bruno anymore with the 4.x version. I have downgraded to 3.5.3 as a workaround.
📝 Steps to reproduce
- Go to Collection tab
- Select Auth
- Click Get Token
- Works in 3.5.3 but gives error under 4.1.0
📁 Collection to reproduce
No response
📷 Screenshots/Live demo link
Standard Auth screen at the collection level
Hi @billfroelich, could you please let us know which OAuth 2.0 provider/identity service you are using?
We tested the Authorization Code grant flow in Bruno 4.1.0 and were able to successfully fetch the access token, so we'd like to understand what may be different in your setup.
Could you also confirm whether the OAuth configuration, particularly the Redirect URI, is the same in Bruno 3.5.3 and 4.1.0?
If possible, a short screen recording of the Get Token flow in 4.1.0, from clicking Get Token until the OAuth2 state mismatch error appears, would help us investigate this further.
Please make sure to mask any client secrets, access tokens, or other sensitive information before sharing.
I am using SAP Mobile Services default OAuth provider. The values including Redirect URI are the same.
https://github.com/user-attachments/assets/f4ca65f1-f213-4fd1-82cf-9d8a86c50d11
@Rohan-Bruno I can second this also for version 4.0.0 - exact same config that works in 3.5.3 with identical redirect uri breaks in Bruno v 4.0.0+, in our case its also through SAP Mobile Services OAuth Flow, proxying to MS Entra ID.
Hi @billfroelich, thanks for confirming the details and for sharing the screen recording.
We’re able to see the OAuth flow completing the SAP Mobile Services/Entra ID authentication before Bruno 4.1.0 returns the OAuth2 state mismatch error.
Since the same configuration works in Bruno 3.5.3 and we’ve also received another report from @marcmuschko with the same behaviour using SAP Mobile Services, we’re going to investigate this further.
We’ll reach out if we need any additional information from you.
@Rohan-Bruno / @sreelakshmi-bruno Is there any update on this issue? I am experiencing the same problem with versions 4.1 and 4.2.
I am continuing to use 3.5.3 for now, but it would be great to have this issue fixed in a newer version so that I can take advantage of the other newly introduced features in the latest release.
@Rohan-Bruno / @sreelakshmi-bruno
Do you have any update on this? One additional challenge with the current workaround: Bruno 3.5.3 automatically updates to version 4.x, where the OAuth2 issue still occurs. This means I have to repeatedly download and reinstall 3.5.3 whenever I need to use OAuth2 authentication, which makes the workaround difficult to sustain.
Is there a way to disable automatic updates, or to keep Bruno on a specific version until this issue is resolved?
It would be great to get a fix in a newer release so I can continue using the latest features without running into this issue. Thanks!
@Rohan-Bruno / @sreelakshmi-bruno I just tested with 4.3.0 and am still having the same issue. Do we have any timeline for a fix?
Hi @jitendrakansal @billfroelich, apologies for the delay on getting back to you!
I understand this is an annoying issue due to which you are unable to update to the latest version, however, we are actively working on this to identify the root cause. Please bear with us on this as we'll get this fixed as soon as possible and share an update at the earliest.
Hi @billfroelich, we have an experimental build with the fix. Can you try it on your side and confirm if this works or not? Thanks!
@sreelakshmi-bruno Using the experimental build I am able to successfully authenticate with Oauth again. Looking forward to the full release.
Thanks @billfroelich for confirming
Hi @billfroelich , this is planned to be released in the upcoming release v4.6.0, which is planned to go out in the second half of December.