diff --git a/packages/opencode/src/provider/auth.ts b/packages/opencode/src/provider/auth.ts index d06253ab4..e6681ff08 100644 --- a/packages/opencode/src/provider/auth.ts +++ b/packages/opencode/src/provider/auth.ts @@ -99,12 +99,16 @@ export namespace ProviderAuth { }) } if ("refresh" in result) { - await Auth.set(input.providerID, { + const info: Auth.Info = { type: "oauth", access: result.access, refresh: result.refresh, expires: result.expires, - }) + } + if (result.accountId) { + info.accountId = result.accountId + } + await Auth.set(input.providerID, info) } return }