Don't redirect to /settings/password after login

master
Keith Irwin 2017-05-02 09:38:16 -04:00
parent 1ccfc899db
commit 61a9fd3f3e
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
2 changed files with 2 additions and 2 deletions

View File

@ -316,7 +316,7 @@ router.route('/password/:token')
// New user created password
else {
req.flash('success', 'Password set. You can use it to log in now. ');
res.redirect('/login#login');
res.redirect('/login?next=/settings');
}
} );

View File

@ -77,7 +77,7 @@ const
app.get( '*', (req,res,next)=>{
// Path for redirects
let nextPath = ( req.path.substring(0, req.path.indexOf('#')) || req.path );
let nextPath = ((req.query.next)?req.query.next: req.path.substring(0,req.path.indexOf('#')) || req.path );
if ( nextPath.substring(0,6)!=='/login' && nextPath.substring(0,7)!=='/logout' ){
req.session.next = nextPath+'#';
//console.log(`Set redirect path to ${nextPath}#`);