diff options
| author | Frank <[email protected]> | 2026-01-13 13:36:37 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-01-13 13:36:37 -0500 |
| commit | f24251f89e277cab2669730dc1e028573e0fe082 (patch) | |
| tree | 94b68225be4e8257fa1d89eedecafd624a7fab0a /packages/console/app/src/routes/auth | |
| parent | 3c5a256f0fe620743f9e1a8f7d1546b87950aa5e (diff) | |
| download | opencode-f24251f89e277cab2669730dc1e028573e0fe082.tar.gz opencode-f24251f89e277cab2669730dc1e028573e0fe082.zip | |
sync
Diffstat (limited to 'packages/console/app/src/routes/auth')
| -rw-r--r-- | packages/console/app/src/routes/auth/authorize.ts | 11 | ||||
| -rw-r--r-- | packages/console/app/src/routes/auth/callback.ts | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/packages/console/app/src/routes/auth/authorize.ts b/packages/console/app/src/routes/auth/authorize.ts index 166466ef8..6be94b146 100644 --- a/packages/console/app/src/routes/auth/authorize.ts +++ b/packages/console/app/src/routes/auth/authorize.ts @@ -2,6 +2,13 @@ import type { APIEvent } from "@solidjs/start/server" import { AuthClient } from "~/context/auth" export async function GET(input: APIEvent) { - const result = await AuthClient.authorize(new URL("./callback", input.request.url).toString(), "code") - return Response.redirect(result.url, 302) + const url = new URL(input.request.url) + // TODO + // input.request.url http://localhost:3001/auth/authorize?continue=/black/subscribe + const result = await AuthClient.authorize( + new URL("/callback/subscribe?foo=bar", input.request.url).toString(), + "code", + ) + // result.url https://auth.frank.dev.opencode.ai/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Fauth%2Fcallback&response_type=code&state=0d3fc834-bcbc-42dc-83ab-c25c2c43c7e3 + return Response.redirect(result.url + "&continue=" + url.searchParams.get("continue"), 302) } diff --git a/packages/console/app/src/routes/auth/callback.ts b/packages/console/app/src/routes/auth/callback.ts index 9b7296791..b03bbdbe5 100644 --- a/packages/console/app/src/routes/auth/callback.ts +++ b/packages/console/app/src/routes/auth/callback.ts @@ -5,6 +5,8 @@ import { useAuthSession } from "~/context/auth" export async function GET(input: APIEvent) { const url = new URL(input.request.url) + console.log("=C=", input.request.url) + throw new Error("Not implemented") try { const code = url.searchParams.get("code") if (!code) throw new Error("No code found") |
