diff --git a/lib/tunnel-client-manager.js b/lib/tunnel-client-manager.js index 4d40c7f..abb8c51 100644 --- a/lib/tunnel-client-manager.js +++ b/lib/tunnel-client-manager.js @@ -53,14 +53,14 @@ module.exports.create = function (deps, config) { , save: function (token) { return PromiseA.resolve().then(function () { var curTokens = storage._read(); - curTokens[storage._makeKey(token)] = token; + curTokens[storage._makeKey(token.jwt)] = token; return storage._write(curTokens); }); } , del: function (token) { return PromiseA.resolve().then(function () { var curTokens = storage._read(); - delete curTokens[storage._makeKey(token)]; + delete curTokens[storage._makeKey(token.jwt)]; return storage._write(curTokens); }); }