diff --git a/packages/server/modules/auth/services/passportService.ts b/packages/server/modules/auth/services/passportService.ts index 2b2ffe618..7fd658a22 100644 --- a/packages/server/modules/auth/services/passportService.ts +++ b/packages/server/modules/auth/services/passportService.ts @@ -52,7 +52,7 @@ export const passportAuthenticationCallbackFactory = } const infoMsg = resolveInfoMessage(info) - if (!user && !e) { + if (!user) { // no user despite there being no error, so authentication failed const message = infoMsg || 'Failed to authenticate, contact server admins' res.redirect(new URL(defaultErrorPath(message), getFrontendOrigin()).toString())