From 7a2f0f0984c0ad110849a9e69013ceb5a29a3cda Mon Sep 17 00:00:00 2001 From: tigerbot Date: Wed, 21 Jun 2017 16:07:48 -0600 Subject: [PATCH] fixed bug saving tunnel tokens --- lib/tunnel-client-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }); }