mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-04 08:24:59 +01:00
8 lines
295 B
TypeScript
8 lines
295 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)
|
|
}
|