Skip to content

Commit

Permalink
🐛 Fixed issue with redirects while not logged in.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdheshnayak committed Dec 21, 2023
1 parent ee7cb18 commit 5f82ecf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/server/helpers/minimal-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}

Expand Down

0 comments on commit 5f82ecf

Please sign in to comment.