This server authenticates users via Minecraft and can run on a single Heroku dyno.
- User joins the Auth Server
- User receives a token (password) and is disconnected
- The UUID and token are sent to your website
You store this pair for a short while - User enters their token on your website
- You compare this token with the stored one
Authentication is complete when the tokens match
Tokens are pronouncable and thus memorable.
Only paid accounts are accepted by MC Auth Server.
See here for an example server-side implementation.
WEBSITE_URI
: The full URI where uuid + token are POSTed toWEBSITE_AUTH_KEY
: TheX-AUTH-SERVER-KEY
HTTP Header
- Make sure you've got python installed
pip install -r requirements.txt
./launch.py
options:
-a <address to listen on> (default 0.0.0.0)
-p <port to listen on> (default 25565)- connect to localhost
heroku create
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
heroku addons:add ruppells-sockets
git push heroku master
- Get output of
heroku config:get RUPPELLS_SOCKETS_FRONTEND_URI
- Connect to that URI, minus the tcp:https:// URI identifier.
- The Minecraft packet handling and original files are based on the work of @barneygale on Quarry.
- The http_listener.js file is based on the work of Ruppells on their Ruppell's Sockets demo project..
- Migration to using Ruppell's sockets is the work of @Jake0oo0.
- Token generation and website connection was added by @jomo.