diff --git a/README.md b/README.md index c257c35..0afb6f3 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ You'll need to provide the folder created in the versions if you're running the | Parameter | Type | Description | Required | |--------------|--------|-------------------------------------------------------------------|----------| | `access_token` | String | Token being checked if it can be used to login with (online mode). | True | +| `client_token` | String | Client token being checked to see if there was a change of client (online mode). | True | ##### refreshAuth @@ -161,3 +162,10 @@ You'll need to provide the folder created in the versions if you're running the #### What should it look like running from console? Showing the emitted information from debug and data, also using `getPid` after the process has been created. ![gif](https://pierce.is-serious.business/3N3PMC4.gif) + +## Contributors +These are the people that helped out that aren't listed [here](https://github.com/Pierce01/MinecraftLauncher-core/graphs/contributors)! +* [Pyker](https://github.com/Pyker) - Forge dependency parsing. +* [Khionu](https://github.com/khionu) - Research on how Minecraft's`natives` are handled. +* [Coding-Kiwi](https://github.com/Coding-Kiwi) - Pointed out I didn't pass `clientToken` in initial authentication function. +* maxbsoft - Pointed out that a certain JVM option causes OSX Minecraft to bug out. diff --git a/components/authenticator.js b/components/authenticator.js index 4de0bd2..621d10c 100644 --- a/components/authenticator.js +++ b/components/authenticator.js @@ -26,6 +26,7 @@ module.exports.getAuth = function (username, password) { }, username: username, password: password, + clientToken: uuid(), requestUser: true } }; @@ -38,7 +39,7 @@ module.exports.getAuth = function (username, password) { const userProfile = { access_token: body.accessToken, - client_token: uuid(), + client_token: body.clientToken, uuid: body.selectedProfile.id, name: body.selectedProfile.name, selected_profile: body.selectedProfile, @@ -50,12 +51,13 @@ module.exports.getAuth = function (username, password) { }); }; -module.exports.validate = function (access_token) { +module.exports.validate = function (access_token, client_token) { return new Promise(resolve => { const requestObject = { url: api_url + "/validate", json: { - "accessToken": access_token + "accessToken": access_token, + "clientToken": client_token } }; diff --git a/package.json b/package.json index 6ae5501..a63fe85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-launcher-core", - "version": "3.7.5", + "version": "3.7.6", "description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS", "main": "index.js", "dependencies": {