diff --git a/backend/src/routes/api/user.js b/backend/src/routes/api/user.js index 42b0bc1b..0569f0bd 100644 --- a/backend/src/routes/api/user.js +++ b/backend/src/routes/api/user.js @@ -66,9 +66,8 @@ router.post( handle(async (req, res) => { const email = req?.body?.email || ""; if ( - !(email.split("@").length > 1) && - !allowedDomains.has(email.split("@")[1]) && - !allowedEmails.has(email) + email.split("@").length <= 1 || + (!allowedDomains.has(email.split("@")[1]) && !allowedEmails.has(email)) ) { throw new HttpError("Sign in with your UoA account", STATUS.FORBIDDEN); }