Skip to content

Node.js based forum software built for the modern web

test: add logs to flaky register/abort test

Barış Soner Uşaklıcb461e988c2c
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js
index 901da4c9d7..36a4b31ffa 100644
--- a/src/controllers/authentication.js
+++ b/src/controllers/authentication.js
@@ -210,10 +210,12 @@ authenticationController.registerAbort = async (req, res) => {
const { interstitials } = await user.interstitials.get(req, req.session.registration);
if (!interstitials.length) {
delete req.session.registration;
+ winston.info(`[register/abort] no intersitials ${JSON.stringify({ uid: req.uid, session: req.session })}`);
return res.redirect(nconf.get('relative_path') + (req.session.returnTo || '/'));
- }
+ }
+ winston.info(`[register/abort] Found intersitials ${JSON.stringify({ uid: req.uid, session: req.session, interstitials })}`);
}
-
+ winston.info(`[register/abort] clearing session ${JSON.stringify({ uid: req.uid, session: req.session })}`);
// End the session and redirect to home
req.session.destroy(() => {
res.clearCookie(nconf.get('sessionKey'), meta.configs.cookie.get());