fix anthropic console auth (#2049)

This commit is contained in:
Dax
2025-08-18 17:12:21 -04:00
committed by GitHub
parent 5d12cadba7
commit f19586cebd
10 changed files with 121 additions and 24 deletions

View File

@@ -0,0 +1,28 @@
import { useSession } from "vinxi/http"
import { createClient } from "@openauthjs/openauth/client"
export const AuthClient = createClient({
clientID: "app",
issuer: "https://auth.dev.opencode.ai",
})
export interface AuthSession {
account: Record<string, {
id: string
email: string
}>
current?: string
}
export function useAuthSession() {
"use server"
return useSession<AuthSession>({
password: "0".repeat(32),
name: "auth"
})
}
export function AuthProvider() {
}