From 43544a44da159326395fbed40dc41fa7a7751a44 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Fri, 7 Jun 2024 14:08:27 -1000 Subject: [PATCH] fix(api): :bug: Fix some redirect URIs breaking the oauth redirection code --- server/api/oauth/authorize/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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", });