diff --git a/src/app/api/oauth/[provider]/[action]/route.js b/src/app/api/oauth/[provider]/[action]/route.js index f85bbfa1..824cad8b 100644 --- a/src/app/api/oauth/[provider]/[action]/route.js +++ b/src/app/api/oauth/[provider]/[action]/route.js @@ -254,6 +254,7 @@ export async function POST(request, { params }) { if (action === "register-session") { // Register proxy session out of URL query (state) + body (codeVerifier). // Zed's codeVerifier encodes the RSA private key — must stay out of URL/logs. + const searchParams = new URL(request.url).searchParams; const state = searchParams.get("state") || body?.state; if (!state) return NextResponse.json({ error: "Missing state" }, { status: 400 }); let ok = false;