Work on SIO and SSL
This commit is contained in:
parent
4a2366eb06
commit
feabf35714
6 changed files with 138 additions and 133 deletions
|
|
@ -27,13 +27,10 @@ function handleAuth(data, accept) {
|
|||
var auth = data.cookie.auth;
|
||||
db.users.verifyAuth(auth, function (err, user) {
|
||||
if (!err) {
|
||||
console.log('VERIFIED: ' + user.name + ' => ' + user.global_rank);
|
||||
data.user = {
|
||||
name: user.name,
|
||||
global_rank: user.global_rank
|
||||
};
|
||||
} else {
|
||||
console.log('Auth fail: ' + err);
|
||||
}
|
||||
accept(null, true);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue