Skip to content

accounts: accept Claude sign-in codes when short URL omits state= - #1659

Merged
i2cjak merged 1 commit into
mainfrom
fix/1656-claude-short-signin
Nov 24, 2026
Merged

i2cjak merged 1 commit into
mainfrom
fix/1656-claude-short-signin

Conversation

@i2cjak

@i2cjak i2cjak commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Claude Code 2.1.331 prints shortened sign-in links with an opaque query token and no state= query parameter (e.g. https://claude.ai/oauth/authorize?z-oxvJ...). Skip the local parts[1] != state check when state is absent from the captured URL and forward the pasted CODE#STATE to the Claude CLI, which validates its own OAuth state. Keep the strict parts[1] != state check whenever state= is present.

Closes #1656

Claude Code 2.1.331 prints shortened sign-in links with an opaque query token and no `state=` query parameter (e.g. https://claude.ai/oauth/authorize?z-oxvJ...). Skip the local `parts[1] != state` check when `state` is absent from the captured URL and forward the pasted `CODE#STATE` to the Claude CLI, which validates its own OAuth state. Keep the strict `parts[1] != state` check whenever `state=` is present.

Closes #1656
@i2cjak
i2cjak merged commit 6935351 into main Nov 24, 2026
2 checks passed
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.

Claude account sign-in always rejects pasted code with Claude Code 2.1.331 (sign-in link has no state=)

1 participant