v1.0.0-beta.5 - Fixed Mojang issue resulting in "Failed to verify username" for specific users.

The Mojang API may randomly return extraneous spaces around the displayName and username fields. Launching the game with these values will result in the aforementioned error. The launcher now trims these values as a precautionary measure.
pull/19/head
Daniel Scalzi 2018-08-24 15:17:32 -04:00
parent 29a8f2a345
commit 70b83a6397
No known key found for this signature in database
GPG Key ID: 5CA2F145B63535F9
4 changed files with 6 additions and 6 deletions

View File

@ -318,9 +318,9 @@ exports.addAuthAccount = function(uuid, accessToken, username, displayName){
config.selectedAccount = uuid
config.authenticationDatabase[uuid] = {
accessToken,
username,
username: username.trim(),
uuid,
displayName
displayName: displayName.trim()
}
return config.authenticationDatabase[uuid]
}

View File

@ -252,10 +252,10 @@ class ProcessBuilder {
let val = null
switch(identifier){
case 'auth_player_name':
val = this.authUser.displayName
val = this.authUser.displayName.trim()
break
case 'version_name':
//val = versionData.id
//val = versionData.id
val = this.server.getID()
break
case 'game_directory':

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "westeroscraftlauncher",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "westeroscraftlauncher",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Custom modded launcher for Westeroscraft",
"productName": "WesterosCraft Launcher",
"main": "index.js",