From 5f82ecfe6c33af2459fcd47d5e97c90d56f74f13 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Thu, 21 Dec 2023 09:42:26 +0530 Subject: [PATCH] :bug: Fixed issue with redirects while not logged in. --- lib/server/helpers/minimal-auth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/server/helpers/minimal-auth.ts b/lib/server/helpers/minimal-auth.ts index b234076b0..5bcd8aaeb 100644 --- a/lib/server/helpers/minimal-auth.ts +++ b/lib/server/helpers/minimal-auth.ts @@ -24,7 +24,10 @@ export const minimalAuth = async (ctx: IExtRemixCtx) => { headers: ctx.request?.headers, }).whoAmI(); - if (whoAmI.errors && whoAmI.errors[0].message === 'user not logged in') { + if ( + whoAmI.errors && + whoAmI.errors[0].message === 'input: auth_me user not logged in' + ) { return redirect(`${authBaseUrl}/login`); }