Skip to content

Commit

Permalink
🐛 Fixed issue with redirects while not logged in. (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdheshnayak authored Dec 21, 2023
1 parent 0b2352c commit 3e094ca
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 3e094ca

Please sign in to comment.