Skip to content

fix(coinbase): modernize OAuth integration - #1901

Merged
nijel merged 1 commit into
python-social-auth:masterfrom
nijel:coinbase
Aug 6, 2026
Merged

fix(coinbase): modernize OAuth integration#1901
nijel merged 1 commit into
python-social-auth:masterfrom
nijel:coinbase

Conversation

@nijel

@nijel nijel commented Aug 6, 2026

Copy link
Copy Markdown
Member

Coinbase's legacy OAuth contract and unversioned user requests can cause otherwise valid logins to fail with 403 responses. Adopt the current endpoints, scopes, version header, and revocation parameters, and treat provider 403s as authentication failures.

Closes #1036

@nijel nijel self-assigned this Aug 6, 2026
@nijel
nijel enabled auto-merge (rebase) August 6, 2026 10:55
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.96970% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.29%. Comparing base (d56fe6d) to head (fa51579).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
social_core/backends/coinbase.py 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1901      +/-   ##
==========================================
+ Coverage   87.17%   87.29%   +0.11%     
==========================================
  Files         352      352              
  Lines       13624    13696      +72     
  Branches      671      674       +3     
==========================================
+ Hits        11877    11956      +79     
+ Misses       1504     1495       -9     
- Partials      243      245       +2     
Flag Coverage Δ
unittests 87.29% <96.96%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23bb3fd2e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread social_core/backends/coinbase.py
Coinbase's legacy OAuth contract and unversioned user requests can cause otherwise valid logins to fail with 403 responses. Adopt the current endpoints, scopes, version header, and revocation parameters, and treat provider 403s as authentication failures.

Closes python-social-auth#1036

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa515797ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ACCESS_TOKEN_URL = "https://api.coinbase.com/oauth/token"
REVOKE_TOKEN_URL = "https://api.coinbase.com/oauth/revoke"
SCOPE_SEPARATOR = ","
DEFAULT_SCOPE = ["wallet:user:read"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve email access in the default scope

For Coinbase applications that rely on the backend's default scopes, wallet:user:read does not grant access to the separately protected email field, so get_user_details() now returns email="" where the legacy user scope returned the user's email. This breaks email-required pipelines and can prevent email-based association for otherwise valid logins; include wallet:user:email in the defaults to preserve the backend's existing behavior.

Useful? React with 👍 / 👎.

@nijel
nijel merged commit d3fc348 into python-social-auth:master Aug 6, 2026
18 checks passed
@nijel
nijel deleted the coinbase branch August 6, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Coinbase login - 403 Forbidden

1 participant