diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index cea396c522..c34b0acd0a 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -94,7 +94,11 @@ function registerAndLoginUser(req, res, userData, callback) { } else { userData.register = true; req.session.registration = userData; - return res.json({ referrer: nconf.get('relative_path') + '/register/complete' }); + if (res.locals.isAPI) { + return res.json({ referrer: nconf.get('relative_path') + '/register/complete' }); + } else { + return res.redirect(nconf.get('relative_path') + '/register/complete'); + } } }); },