ae733c4b3fb3871fe7411b8a7222fa55a5146a00
mc-authn: Authenticator for Minecraft with Microsoft
Installation
pip install mc-authn
Usage
1. Create Azure Token
(You can follow this guide for more details)
- Sign in to the Azure Portal
- Click "Azure Active Directory" (the icon should look like Ramiel from EVA 🤔)
- Click "App registrations" on the left navigation menu
- Click "New registration" on top left
- Give it a name
- For "Supported account types," select "Personal MS accounts only"
- For "Redirect URI", select "Web" and type "http://localhost:18275"
- Now you should be in the overview page of your app!
- You should see a field "Application (client) ID", copy that somewhere
- Click "Certificates & secrets" on the left navbar
- In the "Client secrets" tab, click "New client secret"
- Give it a description
- For "Expires" select "24 months"
- Click "Add"
- There should be "Value" and "Secret ID", copy "Value"
- Write this in
~/.config/mc-auth/auth_config.yml:
ClientID: Paste the "Application (client) ID" here
ClientSecret: Paste the "Value" you copied here
2. Login!
You can now run mc-auth to login! After logging in, it will create a text file ~/.config/mc-auth/mc-token.txt containing your minecraft token.
In your start script for minecraft, add this line before the java command:
export auth_access_token=$(< ~/.config/mc-auth/mc-token.txt)
3. Start Minecraft!
You can now start minecraft!
Description
Languages
Python
100%