mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-03 14:15:19 +02:00
11 lines
308 B
TypeScript
11 lines
308 B
TypeScript
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)
|
|
}
|