Minor fix to mojang api wrapper, removing default option on client token configuration, updating logo to scaled version.
This commit is contained in:
parent
6d6d876aa5
commit
1d10b0209a
Binary file not shown.
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 188 KiB |
BIN
app/assets/images/WesterosSealSquare_old.png
Normal file
BIN
app/assets/images/WesterosSealSquare_old.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
@ -39,7 +39,7 @@ const DEFAULT_CONFIG = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clientToken: uuidV4(),
|
clientToken: uuidV4().replace(/-/g, ''),
|
||||||
selectedServer: null, // Resolved
|
selectedServer: null, // Resolved
|
||||||
selectedAccount: null,
|
selectedAccount: null,
|
||||||
authenticationDatabase: {}
|
authenticationDatabase: {}
|
||||||
@ -82,12 +82,12 @@ exports.load = function(){
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the launcher's Client Token.
|
* 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.
|
* @returns {String} - the launcher's Client Token.
|
||||||
*/
|
*/
|
||||||
exports.getClientToken = function(def = false){
|
exports.getClientToken = function(){
|
||||||
return !def ? config.clientToken : DEFAULT_CONFIG.clientToken
|
return config.clientToken
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,9 +148,10 @@ exports.validate = function(accessToken, clientToken){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
function(error, response, body){
|
function(error, response, body){
|
||||||
if(error && error.message === 'Invalid token'){
|
if(response.statusCode === 403){
|
||||||
fulfill(false)
|
fulfill(false)
|
||||||
} else {
|
} else {
|
||||||
|
// 204 if valid
|
||||||
fulfill(true)
|
fulfill(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -212,7 +213,7 @@ exports.refresh = function(accessToken, clientToken, requestUser = true){
|
|||||||
if(response.statusCode === 200){
|
if(response.statusCode === 200){
|
||||||
fulfill(body)
|
fulfill(body)
|
||||||
} else {
|
} else {
|
||||||
reject()
|
reject(response.body)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user