TW-4922: SSO UX, PKCE fix, huh v2 upgrade#75
Merged
qasim-nylas merged 3 commits intoMay 11, 2026
Conversation
…x env, huh v2 - Show one-time code first and wait for Enter before opening browser (gh auth login style) - Pass environment: "sandbox" when creating applications to fix server error - Upgrade huh v1→v2 and lipgloss v1→v2 to fix duplicate input rendering
…responses - PKCE: use base64(hex(sha256(verifier))) to match Nylas's non-standard S256 - parseError: handle OAuth error format (error/error_description) from /v3/connect/token
- Test parseError handles OAuth error/error_description format - Test parseError falls back to status code on empty body
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gh auth loginpattern)environment: "sandbox"to fixuserAccessDict[environment] is not iterableserver errorbase64(hex(sha256(verifier)))instead of RFC 7636base64url(sha256(verifier))— fixes "Code verifier challenge failed" onnylas auth loginerror/error_descriptionformat from/v3/connect/tokenso errors are no longer opaque "status 400"Test plan
nylas init— SSO shows code, waits for Enter, browser opens afternylas init— app creation succeeds with sandbox environmentnylas init— single App name prompt (no duplicate rendering)nylas auth login— PKCE flow completes successfullygo test ./internal/adapters/dashboard/ ./internal/adapters/nylas/ ./internal/app/auth/ ./internal/cli/common/golangci-lint run --timeout=5m