Skip to content

Fix oauth2 2.0 auth_scheme breaking change#69

Merged
JureCindro merged 4 commits intomasterfrom
fix-oauth2-2.0-auth-scheme
Feb 5, 2026
Merged

Fix oauth2 2.0 auth_scheme breaking change#69
JureCindro merged 4 commits intomasterfrom
fix-oauth2-2.0-auth-scheme

Conversation

@JureCindro
Copy link
Contributor

Summary

  • oauth2 gem 2.0 changed the default auth_scheme from :request_body to :basic_auth
  • This causes OAuth credentials to be sent in the Authorization header instead of the request body
  • Explicitly set auth_scheme: :request_body to maintain backward compatibility

Context

This breaking change affects all apps using this gem when upgrading to oauth2 2.x. Without this fix, existing VCR cassettes and integrations expecting credentials in the request body will fail.

Test plan

  • Verified fix works in bsa-booking with oauth2 2.0.18

🤖 Generated with Claude Code

oauth2 2.0 changed the default auth_scheme from :request_body to
:basic_auth. This causes credentials to be sent in the Authorization
header instead of the request body.

Explicitly set auth_scheme: :request_body to maintain backward
compatibility with existing integrations and VCR cassettes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JureCindro JureCindro requested a review from StoneFrog February 4, 2026 12:58
@JureCindro JureCindro self-assigned this Feb 4, 2026
@JureCindro JureCindro force-pushed the fix-oauth2-2.0-auth-scheme branch 9 times, most recently from 23bd433 to 05e5b8d Compare February 4, 2026 15:08
Sets up automated testing with PostgreSQL across Ruby 2.7/3.0 and Rails 5.0-6.0 matrix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JureCindro JureCindro force-pushed the fix-oauth2-2.0-auth-scheme branch from 05e5b8d to 7c7f769 Compare February 4, 2026 15:15
@JureCindro JureCindro requested a review from Azdaroth February 5, 2026 06:31
…nfigurable

- Remove deprecated Rails 7.0 and 7.1 (EOL)
- Add Rails 8.0 and 8.1
- Add oauth_client_auth_scheme configuration option (defaults to :request_body)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JureCindro JureCindro force-pushed the fix-oauth2-2.0-auth-scheme branch from 67ed44d to 587df35 Compare February 5, 2026 11:45
@JureCindro JureCindro requested a review from StoneFrog February 5, 2026 11:47
Copy link
Contributor

@StoneFrog StoneFrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may wanna add this to changelog (unless you plan to do that later)
Other than that - delicious

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JureCindro JureCindro merged commit 3009947 into master Feb 5, 2026
6 checks passed
@JureCindro JureCindro deleted the fix-oauth2-2.0-auth-scheme branch February 5, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants