You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Login without remember-me option as It will redirect to /home but even if session is assign then also while re-traversing index page It wont redirect to /home so to Fix this
Inside routes.js replace this function with this function which is below
app.get('/', function(req, res){
// This one is for If session is assign so redirect it
if(req.session.user)
{
res.redirect('/home');
}
// check if the user has an auto login key saved in a cookie //
else if (req.cookies.login == undefined){
res.render('login', { title: 'Hello - Please Login To Your Account { For Exp} ' });
}
else{
// attempt automatic login //
AM.validateLoginKey(req.cookies.login, req.ip, function(e, o){
if (o){
AM.autoLogin(o.user, o.pass, function(o){
req.session.user = o;
res.redirect('/home');
});
} else{
res.render('login', { title: 'Hello - Please Login To Your Account' });
}
});
}
});
The text was updated successfully, but these errors were encountered:
Login without remember-me option as It will redirect to /home but even if session is assign then also while re-traversing index page It wont redirect to /home so to Fix this
Inside routes.js replace this function with this function which is below
app.get('/', function(req, res){
The text was updated successfully, but these errors were encountered: