Skip to content

Commit 3b2aa7e

Browse files
committed
Revert "Support basic auth in opencode sdk (#4697)"
This reverts commit b9253d0.
1 parent 997aacf commit 3b2aa7e

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

packages/sdk/js/src/client.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ export function createOpencodeClient(config?: Config & { directory?: string }) {
2424
}
2525
}
2626

27-
if (config?.baseUrl) {
28-
const baseUrl = new URL(config.baseUrl)
29-
if (baseUrl.username || baseUrl.password) {
30-
config.headers = {
31-
...config.headers,
32-
Authorization: `Basic ${btoa(`${baseUrl.username}:${baseUrl.password}`)}`,
33-
}
34-
baseUrl.username = ""
35-
baseUrl.password = ""
36-
config.baseUrl = baseUrl.toString()
37-
}
38-
}
39-
4027
const client = createClient(config)
4128
return new OpencodeClient({ client })
4229
}

0 commit comments

Comments
 (0)