Skip to content

Commit

Permalink
feat: allow registration interstitial abort to also follow returnTo
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Jul 30, 2021
1 parent 96398fa commit b3c9164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ authenticationController.registerComplete = function (req, res, next) {

authenticationController.registerAbort = function (req, res) {
if (req.uid) {
// Clear interstitial data and go home
// Clear interstitial data and continue on...
delete req.session.registration;
res.redirect(`${nconf.get('relative_path')}/`);
res.redirect(nconf.get('relative_path') + req.session.returnTo);
} else {
// End the session and redirect to home
req.session.destroy(() => {
Expand Down

0 comments on commit b3c9164

Please sign in to comment.