node-minecraft-protocol icon indicating copy to clipboard operation
node-minecraft-protocol copied to clipboard

Find a way to run the online test without having the mojang server ban us

Open rom1504 opened this issue 9 years ago • 10 comments

https://github.com/PrismarineJS/node-minecraft-protocol/commit/6fb6b35cc537411ed587d0aafdc7fe7033a6221d

saving the tokens somehow might do it

rom1504 avatar Feb 20 '16 16:02 rom1504

I recently switched to my own second account instead of @roblabla 's for the test and I just got that mail from mojang:

We suspect that your Mojang account email and password may have been compromised. To prevent unauthorized use of your account we've reset your account password. If you use that same password on other sites we strongly recommend that you change your password on those sites as well.

I guess that's what happened with roblabla's account too.

The online test is disabled for now, but we really need to find a better solution if we want to enable that online mode test.

rom1504 avatar Feb 20 '16 18:02 rom1504

We could implement our own auth server fairly easily, and run the tests against that. Not as high fidelity as using the real minecraft servers, but should work well enough ^^.

roblabla avatar Feb 21 '16 02:02 roblabla

I've made a mini module to deal with tokens and simulate the way the official launcher works I don't know if it could fix the problem ?

https://github.com/pqml/prismarine-tokens

pqml avatar Apr 24 '16 07:04 pqml

https://github.com/Litarvan/OpenAuth-Server

rom1504 avatar Jan 30 '17 22:01 rom1504

some discussion about this, there https://github.com/PrismarineJS/mineflayer/issues/551

rom1504 avatar Jul 13 '17 12:07 rom1504

similar to prismarine token is https://github.com/PrismarineJS/node-minecraft-wrap/blob/master/lib/wrap_client.js#L37

Problem is we run tests in parallel + circle ci doesn't keep the token file between runs.

Can we make circle ci keep the token file ? (let's say launcher_profiles.json)

That might be a good enough solution.

rom1504 avatar Jul 20 '17 15:07 rom1504

I don't think Circle CI can have persistent data.

A solution could be to store the json data to a remote server via a simple REST API and secure calls with an API Key. (Firebase / AWS services are good but a simple php script will work too)

You can setup environment variables in Circle CI to hide that key (https://circleci.com/docs/1.0/environment-variables/#setting-environment-variables-for-all-commands-without-adding-them-to-git)

pqml avatar Jul 20 '17 22:07 pqml

ah yes, "hidden" key + encrypted launcher_profiles.json in an other repo. couldn't be enabled for pull requests, but otherwise it might work

rom1504 avatar Jul 21 '17 13:07 rom1504