いままでこんな感じでセッション認証行ってたところ
var cookie = require('cookie').cookie.parse(handshake.headers.cookie);
cookie = connect.utils.parseSignedCookies(cookie, 'secret_key');
var sessionId = cookie['cookie_key']
connectがこんなwarning出してるのに気づいた。
connect: utils.parseSignedCookies: this private api moved with cookie-parser
cookie-parser使えってことらしい。なので、こんな感じに変更したらうまくいった
var cookieParser = require('cookie-parser')
var parseCookie = cookieParser('secret_key');
parseCookie(handshake, null, function(err) {
if (err) {
return accept('Error parseCookie.', false);
}
var sessionId = handshake.signedCookies['cookie_key'];
// sessionIdを使用してチェック
});