Don't redirect to /settings/password after login
parent
1ccfc899db
commit
61a9fd3f3e
|
@ -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');
|
||||
}
|
||||
|
||||
} );
|
||||
|
|
|
@ -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}#`);
|
||||
|
|
Loading…
Reference in New Issue