diff options
| author | Dax <[email protected]> | 2025-08-18 17:12:21 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-18 17:12:21 -0400 |
| commit | f19586cebd77a4d2092e6ff66fb184a1366a9ce4 (patch) | |
| tree | bc1c2f4dbd6e12ed0d4e058c80b16a8071d8f427 /cloud/app/src/context | |
| parent | 5d12cadba7d03ca25becd5942cb8a959be1ddf00 (diff) | |
| download | opencode-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.tsx | 28 |
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() { +} |
