summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src/context
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 /cloud/app/src/context
parent5d12cadba7d03ca25becd5942cb8a959be1ddf00 (diff)
downloadopencode-f19586cebd77a4d2092e6ff66fb184a1366a9ce4.tar.gz
opencode-f19586cebd77a4d2092e6ff66fb184a1366a9ce4.zip
fix anthropic console auth (#2049)
Diffstat (limited to 'cloud/app/src/context')
-rw-r--r--cloud/app/src/context/auth.tsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/cloud/app/src/context/auth.tsx b/cloud/app/src/context/auth.tsx
new file mode 100644
index 000000000..bec949568
--- /dev/null
+++ b/cloud/app/src/context/auth.tsx
@@ -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() {
+}