nodejs 세션,쿠키 및 인증
nodejs 세션을 통한 로그인/회원가입가입설정app.post('/auth/register', function(req, res){ hasher({password:req.body.password}, function(err, pass, salt, hash){ var user = { username:req.body.username, password:hash, salt:salt, displayName:req.body.displayName }; users.push(user); req.session.displayName = req.body.displayName; req.session.save(function(){ res.redirect('/welcome'); }); });});password 객체를 받아 salt(..
더보기