diff --git a/app/assets/images/WesterosSealSquare.png b/app/assets/images/WesterosSealSquare.png index 076018cb..745443ef 100644 Binary files a/app/assets/images/WesterosSealSquare.png and b/app/assets/images/WesterosSealSquare.png differ diff --git a/app/assets/images/WesterosSealSquare_old.png b/app/assets/images/WesterosSealSquare_old.png new file mode 100644 index 00000000..076018cb Binary files /dev/null and b/app/assets/images/WesterosSealSquare_old.png differ diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index d63a6d98..d6c5436f 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -39,7 +39,7 @@ const DEFAULT_CONFIG = { } }, - clientToken: uuidV4(), + clientToken: uuidV4().replace(/-/g, ''), selectedServer: null, // Resolved selectedAccount: null, authenticationDatabase: {} @@ -82,12 +82,12 @@ exports.load = function(){ /** * Retrieve the launcher's Client Token. + * There is no default client token. * - * @param {Boolean} def - optional. If true, the default value will be returned. * @returns {String} - the launcher's Client Token. */ -exports.getClientToken = function(def = false){ - return !def ? config.clientToken : DEFAULT_CONFIG.clientToken +exports.getClientToken = function(){ + return config.clientToken } /** diff --git a/app/assets/js/mojang.js b/app/assets/js/mojang.js index c75a64c1..47457bca 100644 --- a/app/assets/js/mojang.js +++ b/app/assets/js/mojang.js @@ -148,9 +148,10 @@ exports.validate = function(accessToken, clientToken){ } }, function(error, response, body){ - if(error && error.message === 'Invalid token'){ + if(response.statusCode === 403){ fulfill(false) } else { + // 204 if valid fulfill(true) } }) @@ -212,7 +213,7 @@ exports.refresh = function(accessToken, clientToken, requestUser = true){ if(response.statusCode === 200){ fulfill(body) } else { - reject() + reject(response.body) } }) })