Skip to content

OAuth client scope handling breaks on comma-separated scope strings #3566

Description

@dgilman-perplexity

Initial Checks

  • I confirm that I'm using the newest release of my line (verified on main and 2.2.0)
  • I confirm that I searched for my issue in the issues before opening this one (searched "comma scope", "scope separator")

Release line

v2 (v1 shares the code)

Description

RFC 6749 §3.3 separates scopes with spaces, but real-world authorization servers (e.g. Linear) return comma-separated scope values in token responses and WWW-Authenticate challenges. union_scopes and the offline_access membership checks split on whitespace only, so a comma-separated grant is treated as one opaque scope: the SEP-2350 step-up union stops deduplicating (scopes accumulate as read,write read write) and offline_access/prompt=consent handling misfires.

I have a fix rebased onto current main: a parse_scopes helper accepting both separators, used in union_scopes and the offline_access membership checks, with parametrized tests. Please assign so the PR stays open.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Affects the v2 line (2.x on main)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions