Skip to content

fix(cli): Stop requesting user_preference scopes by default - #2567

Merged
BYK merged 2 commits into
mainfrom
revert-2503-user-preference-scopes
Nov 27, 2026
Merged

BYK merged 2 commits into
mainfrom
revert-2503-user-preference-scopes

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Partially reverts #2503.

#2503 added user_preference:read and user_preference:write to the default login scopes. Because of that, every existing CLI user would be asked to log in again on their next sentry cli upgrade. We don't want to force that re-auth.

This PR takes the two scopes back out of OAUTH_SCOPES, the default login request, so --read-only and the generated scope docs no longer list them either. They stay in SENTRY_SCOPES, so they work as opt-in scopes, the same way org:tokens does:

  • sentry auth login --scope … and sentry auth refresh --scope … still accept them.
  • A 403 that names user_preference:* as an accepted scope tells the user to run sentry auth refresh --scope <defaults>,user_preference:read.
  • Scope recovery keeps them on later elevations once a login has them.

Refs ENG-9142

via @DominikB2014.

--

View Session [Sentry]

This reverts commit a020760.

Adding scopes to the default login set asks every existing user to log
in again on their next upgrade, which we don't want to force right now.

Co-Authored-By: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 27, 2026 6:57pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 27, 2026 6:57pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 27, 2026

Copy link
Copy Markdown

ENG-9142

@DominikB2014
DominikB2014 marked this pull request as ready for review November 27, 2026 18:53
@sentry-junior
sentry-junior Bot requested a review from DominikB2014 November 27, 2026 18:53
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 27, 2026
@DominikB2014
DominikB2014 marked this pull request as draft November 27, 2026 18:55
The scopes stay out of the default login request, so existing users are
not asked to log in again, but `auth login --scope` and
`auth refresh --scope` still accept them, and a 403 that needs one points
at `auth refresh --scope` with the defaults plus that scope.

Co-Authored-By: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
@vercel
vercel Bot temporarily deployed to Preview – sentry-local November 27, 2026 18:57 Inactive
@sentry-junior sentry-junior Bot changed the title Revert "feat(cli): Request user_preference scopes by default (#2503)" fix(cli): Stop requesting user_preference scopes by default Nov 27, 2026
@DominikB2014
DominikB2014 marked this pull request as ready for review November 27, 2026 18:59
@DominikB2014
DominikB2014 requested a review from BYK November 27, 2026 18:59
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: low PR risk score: low labels Nov 27, 2026
@DominikB2014
DominikB2014 requested a review from a team November 27, 2026 19:01
@BYK
BYK enabled auto-merge (squash) November 27, 2026 19:06
@BYK
BYK merged commit 08cd2e5 into main Nov 27, 2026
30 checks passed
@BYK
BYK deleted the revert-2503-user-preference-scopes branch November 27, 2026 19:07

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — efd2702d Deployed Nov 27, 2026 by vercel[bot]
Preview – sentry-local — efd2702d Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants