Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
507 changes: 478 additions & 29 deletions cloudflare/packages/worker/src/index.ts

Large diffs are not rendered by default.

423 changes: 423 additions & 0 deletions cloudflare/packages/worker/src/legacy-migration.ts

Large diffs are not rendered by default.

876 changes: 876 additions & 0 deletions cloudflare/packages/worker/test/tenant-migration.test.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions internal/accounts/codex_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s CodexStore) SyncActiveToStore() error {
return err
}
defer lock.Close()
account, found, err := s.FindStored(email)
account, found, err := s.findStoredExact(email)
if err != nil || !found {
return err
}
Expand Down Expand Up @@ -218,7 +218,7 @@ func (s CodexStore) refreshStored(ctx context.Context, client *http.Client, acco
}
defer lock.Close()

latest, found, err := s.FindStored(account.Email)
latest, found, err := s.findStoredExact(account.Email)
if err != nil {
logCodexRefreshFailed(ctx, s, account, force, err)
return account, false, err
Expand Down Expand Up @@ -277,7 +277,7 @@ func (s CodexStore) refreshStored(ctx context.Context, client *http.Client, acco
}

func (s CodexStore) recoverRefreshedAccount(previous StoredCodexAccount) (StoredCodexAccount, bool) {
latest, found, err := s.FindStored(previous.Email)
latest, found, err := s.findStoredExact(previous.Email)
if err != nil || !found || latest.Auth.Tokens == nil {
return StoredCodexAccount{}, false
}
Expand Down
Loading