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
9 changes: 5 additions & 4 deletions packages/opencode/src/provider/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
})
Expand Down
2 changes: 2 additions & 0 deletions packages/plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export type AuthOuathResult = { url: string; instructions: string } & (
access: string
expires: number
accountId?: string
enterpriseUrl?: string
}
| { key: string }
))
Expand All @@ -149,6 +150,7 @@ export type AuthOuathResult = { url: string; instructions: string } & (
access: string
expires: number
accountId?: string
enterpriseUrl?: string
}
| { key: string }
))
Expand Down
Loading