mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-26 04:04:22 +01:00
fix anthropic console auth (#2049)
This commit is contained in:
28
cloud/app/src/context/auth.tsx
Normal file
28
cloud/app/src/context/auth.tsx
Normal 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() {
|
||||
}
|
||||
Reference in New Issue
Block a user