Stripe is a top provider of payment infrastructure and long known for having a fantastic developer...
OAuth 2 Updates from V1.x.x to V2.0.0 | Breaking Change
We've just released Bruno v2.0.0, and it includes major improvements to how OAuth 2 authentication works—making your workflow simpler, cleaner, and much faster!
This update introduces a breaking change, and you'll need to update any existing collections that use OAuth 2.
What's changed with OAuth 2 in Bruno v2.0.0?
- Automatic token injection: Tokens are now automatically injected into request headers or parameters—no manual scripting required.
- Variable-based token access: Tokens can now be easily accessed and managed using Bruno variables.
- Simplified configuration: You no longer need separate setups for authorization and resource requests. Everything happens seamlessly within a single request.
- No more scripting headers: Forget the hassle of manually scripting to set headers—Bruno handles this automatically.
- Folder-level Auth: OAuth 2 is now available at the folder-level in case just part of your collection needs to leverage an OAuth flow.
- Auto-fetch and Refresh: You now have the control to dictate that the token is both automatically fetched and refreshed.
Previous Workflow (Bruno v1.x.x):
Previously, setting up OAuth 2 involved two separate requests:
- Authorization Request:
- Create a request with an empty URL.
- Configure OAuth 2 details in the 'Auth' tab to obtain an access token.
- Write a post-response script to save the access token to a variable.
- Resource Request:
- Create a second request to the actual endpoint.
- Manually pass the Bearer Token authentication using the saved variable.
Updating Your Collections (Required for Bruno v2.0.0):
To accommodate the breaking change and migrate to the new OAuth 2 workflow:
- Update your original Authorization Request: Add the resource endpoint URL directly to this request.
- Remove scripting: Delete any post-response scripts previously used to manually save tokens.
- Delete the second request: The separate Resource Request is no longer necessary.
Make sure to perform these updates on all existing collections using OAuth 2 to ensure they continue functioning correctly in Bruno 2.0.0.