diff options
| author | Aiden Cline <[email protected]> | 2026-03-25 23:59:53 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-25 23:59:53 -0500 |
| commit | d500a8432a690e802edcc065df84a9c9ec8c3652 (patch) | |
| tree | 636d3c71732bc8c2b43ee4e7d7425f4a4cd78191 | |
| parent | 2d502d6ffe1aaf8c02d26b863ad4fd8d82bf28b5 (diff) | |
| download | opencode-d500a8432a690e802edcc065df84a9c9ec8c3652.tar.gz opencode-d500a8432a690e802edcc065df84a9c9ec8c3652.zip | |
fix: ensure enterprise url is set properly during auth flow (#19212)
| -rw-r--r-- | packages/opencode/src/provider/auth.ts | 9 | ||||
| -rw-r--r-- | packages/plugin/src/index.ts | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/packages/opencode/src/provider/auth.ts b/packages/opencode/src/provider/auth.ts index 759f8803a..fc4cc5e6b 100644 --- a/packages/opencode/src/provider/auth.ts +++ b/packages/opencode/src/provider/auth.ts @@ -215,12 +215,13 @@ export namespace ProviderAuth { } if ("refresh" in result) { + const { type: _, provider: __, refresh, access, expires, ...extra } = result yield* auth.set(input.providerID, { type: "oauth", - access: result.access, - refresh: result.refresh, - expires: result.expires, - ...(result.accountId ? { accountId: result.accountId } : {}), + access, + refresh, + expires, + ...extra, }) } }) diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 7e5ae7a6e..8bdb51a2a 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -129,6 +129,7 @@ export type AuthOuathResult = { url: string; instructions: string } & ( access: string expires: number accountId?: string + enterpriseUrl?: string } | { key: string } )) @@ -149,6 +150,7 @@ export type AuthOuathResult = { url: string; instructions: string } & ( access: string expires: number accountId?: string + enterpriseUrl?: string } | { key: string } )) |
