Skip to content

Commit f12e14c

Browse files
fix(app): identify desktop in Console device auth (v1) (anomalyco#47000)
1 parent b578b72 commit f12e14c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/app/src/components/dialog-connect-provider.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ExternalLink } from "@/components/external-link"
3333
import { useServerSDK } from "@/context/server-sdk"
3434
import { useServerSync } from "@/context/server-sync"
3535
import { useLanguage } from "@/context/language"
36+
import { usePlatform } from "@/context/platform"
3637
import { useSettings } from "@/context/settings"
3738
import { popularProviders, useProviders } from "@/hooks/use-providers"
3839
import { CustomProviderForm } from "./dialog-custom-provider"
@@ -386,6 +387,7 @@ function ProviderConnection(props: {
386387
const serverSDK = useServerSDK()
387388
const params = useParams()
388389
const language = useLanguage()
390+
const platform = usePlatform()
389391
const settings = useSettings()
390392
const newLayout = settings.general.newLayoutDesigns
391393
const providers = useProviders(() => props.directory?.())
@@ -560,6 +562,11 @@ function ProviderConnection(props: {
560562
})
561563
.then((x) => {
562564
if (!alive.value) return
565+
if (props.provider === "opencode" && platform.platform === "desktop") {
566+
const url = new URL(x.data.url)
567+
url.searchParams.set("client_id", "opencode-desktop")
568+
x.data.url = url.href
569+
}
563570
dispatch({ type: "auth.complete", authorization: x.data })
564571
})
565572
.catch((e) => {

0 commit comments

Comments
 (0)