feat: browser-based login and --token flag for connect auth#98
Merged
lee-reinhardt merged 1 commit intomainfrom Mar 13, 2026
Merged
feat: browser-based login and --token flag for connect auth#98lee-reinhardt merged 1 commit intomainfrom
lee-reinhardt merged 1 commit intomainfrom
Conversation
replace email+password login with browser-based OAuth flow as the default for `avocado connect auth login`. CLI binds a localhost TCP listener, prints a URL, waits for the browser callback, exchanges the one-time code for an API token, and saves the profile. add --token flag for direct PAT-based login (validates via GET /api/me). remove --email and --password flags, LoginClient, and CsrfResponse (dead code after dropping the password flow).
8f902c9 to
adaa0cf
Compare
mobileoverlord
approved these changes
Mar 13, 2026
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
avocado connect auth loginnow opens a browser-based flow — supports OAuth-only accounts (e.g. Google SSO domains)--tokenflag for direct PAT login (validates viaGET /api/me, no browser needed)--emailand--passwordflags,LoginClient, andCsrfResponse(dead code)Test plan
avocado connect auth login→ browser opens → sign in → CLI receives token and saves profileavocado connect auth login --token <pat>→ validates and saves without browseravocado connect auth login --profile staging --url https://staging.peridio.com→ correct profile saved--helpshows updated flags (no --email/--password, has --token)cargo clippypasses with zero warnings