Fixes a bug where expired token would not be refreshed

This commit is contained in:
Jeffrey Morgan 2015-06-10 10:30:39 -07:00
parent 05e32dc3e5
commit c5d8f57b13
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module.exports = {
let data = JSON.parse(body);
// If the JWT has expired, then log in again to get a new JWT
if (data && data.detail === 'Signature has expired.') {
if (data && data.detail.indexOf('expired') !== -1) {
let config = this.config();
if (!this.config()) {
this.logout();