summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src/context
diff options
context:
space:
mode:
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() {
+}