diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 4e11ddaa1e..78a95269ba 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -73,9 +73,6 @@ async function registerAndLoginUser(req, res, userData) { return complete; } -const registerAndLoginUserCallback = util.callbackify(registerAndLoginUser); - - authenticationController.register = async function (req, res) { const registrationType = meta.config.registrationType || 'normal'; @@ -197,7 +194,12 @@ authenticationController.registerComplete = function (req, res, next) { if (req.session.registration.register === true) { res.locals.processLogin = true; - registerAndLoginUserCallback(req, res, req.session.registration, done); + req.body.noscript = 'true'; // trigger full page load on error + + const data = await registerAndLoginUser(req, res, req.session.registration); + if (!data) { + winston.warn('[register] Interstitial callbacks processed with no errors, but one or more interstitials remain. This is likely an issue with one of the interstitials not properly handling a null case or invalid value.'); + } } else { // Update user hash, clear registration data in session const payload = req.session.registration;