Merge pull request #553 from thelounge/astorije/fix-auth-token

Fix token persistency across server refresh
This commit is contained in:
Maxime Poulin 2016-08-11 01:41:21 -04:00 committed by GitHub
commit 11654ff3c1
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ function ClientManager() {
ClientManager.prototype.findClient = function(name, token) {
for (var i in this.clients) {
var client = this.clients[i];
if (client.name === name || (token && token === client.token)) {
if (client.name === name || (token && token === client.config.token)) {
return client;
}
}

View File

@ -282,11 +282,11 @@ function auth(data) {
}
} else {
client = manager.findClient(data.user, data.token);
var signedIn = data.token && client && client.token === data.token;
var signedIn = data.token && data.token === client.config.token;
var token;
if (data.remember || data.token) {
token = client.token;
token = client.config.token;
}
var authCallback = function(success) {