summaryrefslogtreecommitdiffhomepage
path: root/packages/plugin
diff options
context:
space:
mode:
authorDax <[email protected]>2025-08-18 17:12:21 -0400
committerGitHub <[email protected]>2025-08-18 17:12:21 -0400
commitf19586cebd77a4d2092e6ff66fb184a1366a9ce4 (patch)
treebc1c2f4dbd6e12ed0d4e058c80b16a8071d8f427 /packages/plugin
parent5d12cadba7d03ca25becd5942cb8a959be1ddf00 (diff)
downloadopencode-f19586cebd77a4d2092e6ff66fb184a1366a9ce4.tar.gz
opencode-f19586cebd77a4d2092e6ff66fb184a1366a9ce4.zip
fix anthropic console auth (#2049)
Diffstat (limited to 'packages/plugin')
-rw-r--r--packages/plugin/src/index.ts28
1 files changed, 18 insertions, 10 deletions
diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts
index 1a6cbf124..a214af110 100644
--- a/packages/plugin/src/index.ts
+++ b/packages/plugin/src/index.ts
@@ -32,12 +32,16 @@ export interface Hooks {
| {
method: "auto"
callback(): Promise<
- | {
+ | ({
type: "success"
- refresh: string
- access: string
- expires: number
- }
+ } & (
+ | {
+ refresh: string
+ access: string
+ expires: number
+ }
+ | { key: string }
+ ))
| {
type: "failed"
}
@@ -46,12 +50,16 @@ export interface Hooks {
| {
method: "code"
callback(code: string): Promise<
- | {
+ | ({
type: "success"
- refresh: string
- access: string
- expires: number
- }
+ } & (
+ | {
+ refresh: string
+ access: string
+ expires: number
+ }
+ | { key: string }
+ ))
| {
type: "failed"
}