Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
/ mc_auth_server Public archive
forked from barneygale/quarry

SpongeMC authentication server software, based on quarry.

License

Notifications You must be signed in to change notification settings

mc-extras/mc_auth_server

 
 

Repository files navigation

MC Auth Server

This server authenticates users via Minecraft and can run on a single Heroku dyno.

How it works:

  1. User joins the Auth Server
  2. User receives a token (password) and is disconnected
  3. The UUID and token are sent to your website
    You store this pair for a short while
  4. User enters their token on your website
  5. 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.

UX

Inside Minecraft:
server demo gif

On your website:
web demo gif

Installing

Environment variables

  • WEBSITE_URI: The full URI where uuid + token are POSTed to
  • WEBSITE_AUTH_KEY: The X-AUTH-SERVER-KEY HTTP Header

On your machine

  • 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

On Heroku

  • 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:// URI identifier.

Credits

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Other 1.6%