Просмотр исходного кода

fix: ensure /connect works for openai business plans too (was missing field)

Aiden Cline 1 месяц назад
Родитель
Сommit
ee8b38ab26
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      packages/opencode/src/provider/auth.ts

+ 6 - 2
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
       }