diff --git a/server/api/oauth/authorize/index.ts b/server/api/oauth/authorize/index.ts index 24888742..88dca5a4 100644 --- a/server/api/oauth/authorize/index.ts +++ b/server/api/oauth/authorize/index.ts @@ -299,10 +299,10 @@ export default (app: Hono) => if (state) searchParams.append("state", state); + redirectUri.search = searchParams.toString(); + return response(null, 302, { - Location: `${redirectUri.origin}${ - redirectUri.pathname - }?${searchParams.toString()}`, + Location: redirectUri.toString(), "Cache-Control": "no-store", Pragma: "no-cache", });