Skip to content

Secure CLI browser login with state and PKCE - #22

Open
jsibbison-square wants to merge 1 commit into
mainfrom
jsib-261015-login-state-pkce
Open

jsibbison-square wants to merge 1 commit into
mainfrom
jsib-261015-login-state-pkce

Conversation

@jsibbison-square

Copy link
Copy Markdown
Collaborator

CLI browser login now generates fresh random state and an S256 PKCE challenge for each attempt. It rejects callbacks with missing, mismatched, or duplicate state, and sends the in-memory verifier when exchanging the code before verifying and storing the session. This binds the callback and code exchange to the initiating CLI login.

Keeps Blox proxy authentication unchanged, updates the auth-flow documentation, and consolidates overlapping tests and mock-server helpers.

Validation:

  • just check passed: formatting, Clippy, and all 350 tests, including Blox auth bypass coverage.
  • A fresh local browser login against https://test.blockstaging.build completed successfully and the issued session passed /v1/auth/me verification.
  • Tests cover the RFC S256 vector, exchange payload, invalid state, malformed callbacks, and secret redaction.

@jsibbison-square
jsibbison-square marked this pull request as ready for review October 15, 2026 02:53
@jsibbison-square
jsibbison-square requested a review from a team as a code owner October 15, 2026 02:53
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.

1 participant