feat: implement OAuth2 interactive login and user info fetching#474
Merged
Soner (shyim) merged 3 commits intomainfrom Mar 13, 2026
Merged
feat: implement OAuth2 interactive login and user info fetching#474Soner (shyim) merged 3 commits intomainfrom
Soner (shyim) merged 3 commits intomainfrom
Conversation
e07dc43 to
2605f92
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds OAuth2/OIDC-based interactive login (with PKCE + localhost callback) and switches account API base URLs to support staging vs production, while removing the legacy file-based credential config.
Changes:
- Introduce interactive OAuth2 login flow and OIDC environment-based endpoint selection (staging vs prod).
- Update account-api requests to use a dynamic API base URL helper and standard
http.Method*constants. - Remove legacy config module/tests and stop persisting email/password in config.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/system/browser.go | Adds cross-platform helper to open the login URL in the default browser. |
| internal/account-api/oauth2.go | Implements interactive OAuth2 login via localhost callback, PKCE, and browser launch. |
| internal/account-api/oidc.go | Adds staging/prod endpoint + client ID + API URL selection. |
| internal/account-api/client.go | Supports OAuth2 token + legacy token cache formats; updates auth header logic and logging. |
| internal/account-api/login.go | Reworks login: token cache → env credentials (legacy) → interactive OAuth2. |
| internal/account-api/producer*.go, updates.go | Switch to getApiUrl() and http.Method* for requests. |
| cmd/root.go, cmd/account/* | Removes config dependency and updates login/logout commands for OAuth2 flow. |
| internal/config/* | Removes legacy credential config implementation and associated testdata/tests. |
| .golangci.yml | Disables forbidigo linter for internal/account-api/*. |
| .claude/worktrees/twinkling-stargazing-neumann | Adds a Claude worktree pointer file to the repo. |
| go.mod, go.sum | Drops github.com/caarlos0/env/v9 dependency. |
Comments suppressed due to low confidence (1)
.claude/worktrees/twinkling-stargazing-neumann:1
- This adds a tool/worktree pointer file that appears unrelated to the OAuth2 login feature and may be environment-specific. Consider removing it from the PR and/or adding an appropriate
.gitignorerule if these files are not intended to be versioned.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
2605f92 to
a060aa5
Compare
a060aa5 to
45fd46b
Compare
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.
Staging
Production
Fixes #896