This is a test web application for authenticating with Mojang/Minecraft via Xbox Live and OAuth2.
The login flow was mostly implemented using wiki.vg as a guide.
Before starting, you will first need to obtain an OAuth 2.0 Client ID & secret by creating a Microsoft Azure application.
When prompted, use http://localhost/oauth2-callback as the redirect uri
After obtaining your client id and secret, set the following environment
variables or create a file named .env
with the following values:
XBOXLIVE_CLIENT_ID=<client_id>
XBOXLIVE_CLIENT_SECRET=<client_secret>
Use poetry to install dependencies and run
poetry install
poetry shell
uvicorn app:app
# or
python -m app