From ac906acbe2706cf99076756d99f6302114b4dd27 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 4 Sep 2024 23:18:08 +0200 Subject: [PATCH] fix(api): :bug: Encode redirect URI --- api/api/auth/redirect/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/api/auth/redirect/index.ts b/api/api/auth/redirect/index.ts index ebc0590f..e2dd84eb 100644 --- a/api/api/auth/redirect/index.ts +++ b/api/api/auth/redirect/index.ts @@ -76,9 +76,11 @@ export default apiRoute((app) => // Redirect back to application return context.redirect( - `${redirect_uri}?${new URLSearchParams({ - code, - }).toString()}`, + encodeURI( + `${redirect_uri}?${new URLSearchParams({ + code, + }).toString()}`, + ), ); }), );