-
Notifications
You must be signed in to change notification settings - Fork 15.7k
core: make account login upgrades safe while adding multi-account workspace auth #15487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 35 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
9dbf3a2
core: rename auth command to providers for clearer credential management
thdxr d16e5b9
core: rename control module to account for clearer authentication man…
thdxr b5515dd
core: add device flow authentication commands
thdxr 7b5b665
core: support managing multiple authenticated accounts with individua…
thdxr a5d727e
core: enable workspace-aware configuration and account management com…
thdxr a44f78c
core: maintain backward compatibility with existing account data by r…
thdxr 902268e
core: rename workspace scope to org across account and session surfaces
kitlangton b19dc93
core: resolve account config env templates after loading control token
kitlangton e923047
core: route session sharing through org-scoped control APIs
kitlangton fec8d5b
core: prevent share auth headers from being sent cross-origin
kitlangton adc9536
core: refactor account module to Effect with repo/service split
kitlangton 48158ce
core: simplify account repo/service after review
kitlangton f807875
core: effectify CLI account commands with tagged PollResult union
kitlangton 1a2ddf9
core: tighten account service and CLI typing
kitlangton 95279ab
core: group org lookups by account
kitlangton 2db9d31
core: use service shape helper for account api
kitlangton 270f44f
Merge upstream/dev into cli-auth-cloud
kitlangton 7af0546
core: restore session workspace scope
kitlangton 0e642ed
core: separate account repo errors
kitlangton e5b3407
core: remove dead auth command
kitlangton a581493
test: cover account service flows
kitlangton 48cf609
core: track active account separately from org selection
kitlangton a2b527f
core: simplify account error payloads
kitlangton 91b9a03
Merge upstream/dev into cli-auth-cloud
kitlangton 49deb72
chore: bump effect beta
kitlangton eda8756
core: rename OPENCODE_CONTROL_TOKEN to OPENCODE_CONSOLE_TOKEN
kitlangton b4b24cf
core: inline helpers and extract magic number in account repo
kitlangton 28f795a
core: fix type error in account repo list mapping
kitlangton 30a501b
core: move org selection from account table to account_state
kitlangton 41114b1
Merge remote-tracking branch 'upstream/dev' into cli-auth-cloud
kitlangton e59e104
core: improve logout UX with account picker and warn on missing refre…
kitlangton f003c5d
core: gracefully handle remote account config fetch failure
kitlangton ae821ae
core: hide account commands from help output
kitlangton 531ba1d
test: truncate tables instead of deleting db file in account tests
kitlangton 0a05161
core: cleanup from simplify review
kitlangton cf40bf0
core: rename leftover control references to console/account
kitlangton 1568d73
core: remove default server URL, require login URL argument
kitlangton c632247
core: port missed upstream auth changes into providers
kitlangton b3bd563
test: update share-next test to match renamed error message
kitlangton cecfb62
fix: use relative imports in .sql.ts files for drizzle-kit compatibility
kitlangton 3457728
chore: remove commented-out legacy unique index
kitlangton 635d30f
core: rename login param from url to server to remove pointless alias
kitlangton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
17 changes: 17 additions & 0 deletions
17
packages/opencode/migration/20260228203230_blue_harpoon/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| CREATE TABLE `account` ( | ||
| `id` text PRIMARY KEY, | ||
| `email` text NOT NULL, | ||
| `url` text NOT NULL, | ||
| `access_token` text NOT NULL, | ||
| `refresh_token` text NOT NULL, | ||
| `token_expiry` integer, | ||
| `selected_org_id` text, | ||
| `time_created` integer NOT NULL, | ||
| `time_updated` integer NOT NULL | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE `account_state` ( | ||
| `id` integer PRIMARY KEY NOT NULL, | ||
| `active_account_id` text, | ||
| FOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null | ||
| ); | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.