From a9930b0a679e15f478a790c84bf6bda112db2cdb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:59:35 +0000 Subject: [PATCH] Update authentication documentation for OAuth 2.0 device code flow - Update Account setting in configuration.md: clarify that Microsoft accounts don't need passwords (device code flow with 2FA support), add separate examples for Microsoft, offline, and Yggdrasil accounts - Update usage.md: add tip about device code flow for Microsoft accounts, update command-line examples to show Microsoft and offline patterns, clarify that password is not needed in config files for Microsoft auth - Update README.md features list: add Microsoft authentication with 2FA support as a listed feature Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com> Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/3afd0e85-19ae-45c7-ac4b-c2b7bf733008 --- docs/guide/README.md | 1 + docs/guide/configuration.md | 24 ++++++++++++++++++++---- docs/guide/usage.md | 18 ++++++++++++++---- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/docs/guide/README.md b/docs/guide/README.md index c1909fcf..e2d179b3 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -39,6 +39,7 @@ It was originally made by [ORelio](https://github.com/ORelio) in 2012 on the [Mi - [Get alerted on certain keywords](chat-bots.md#alerts) - [Auto Respond](chat-bots.md#auto-respond) +- Microsoft account authentication with 2FA support (OAuth 2.0 device code flow) - [Anti AFK](chat-bots.md#anti-afk) - [Auto Relog](chat-bots.md#auto-relog) - [Script Scheduler](chat-bots.md#script-scheduler) diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index d7e378b3..2e0d3235 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -67,17 +67,33 @@ Coordinate = { x = 145, y = 64, z = 2045 } - **Description:** - This setting is where you need to provide your in-game name (for offline accounts) or email for Microsoft accounts (Mojang accounts do not work anymore) and your password (if using an offline account, use `-` for the password). + This setting is where you provide your account login information. + + For **Microsoft accounts**, set `Login` to your Microsoft email. You do not need to provide a password because MCC uses the OAuth 2.0 device code flow for authentication (you sign in through your browser, with full 2FA support). + + For **offline accounts**, set `Login` to your desired in-game name and `Password` to `-`. + + For **Yggdrasil accounts**, set `Login` and `Password` to the credentials for your authlib server. - **Format:** - `Account = { Login = "", Password = "" }` + `Account = { Login = "" }` - **Type:** `inline table` -- **Example:** +- **Examples:** - `Account = { Login = "some.random.player@gmail.com", Password = "myEpicPassword123" }` + Microsoft account (password not needed): + + ``` + Account = { Login = "player@example.com" } + ``` + + Offline account: + + ``` + Account = { Login = "Steve", Password = "-" } + ``` #### `Server` diff --git a/docs/guide/usage.md b/docs/guide/usage.md index c23017c5..8c1d4077 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -121,11 +121,20 @@ MinecraftClient.exe --section.setting=value [--other settings] MinecraftClient.exe [--other settings] ``` +

Tip

+ +**Microsoft accounts use the OAuth 2.0 device code flow and do not require a password on the command line. MCC will display a code and a URL for you to sign in through your browser (with full 2FA support). You can simply omit the password or use `""` as a placeholder.** + +
+ Examples: ```bash -# Logging in as a user: notch, with a password: password123 onto a server with the ip: mc.someserver.com:25565 -MinecraftClient.exe notch password123 mc.someserver.com:25565 +# Microsoft account: connect to a server (you will sign in via device code in your browser) +MinecraftClient.exe player@example.com "" mc.someserver.com:25565 + +# Offline account: connect with a chosen username +MinecraftClient.exe Steve - mc.someserver.com:25565 # Overriding a setting from MinecraftClient.ini using a command-line parameter MinecraftClient.exe --debugmessages=false @@ -150,7 +159,7 @@ MinecraftClient.exe - This will automatically connect you to the chosen server. - You may omit password and/or server to specify e.g. only the login -- To specify a server but ask password interactively, use `""` as password. +- For Microsoft accounts, password is not required (device code flow is used). Use `""` as a placeholder if you need to specify a server. - To specify offline mode with no password, use `-` as password. ```bash @@ -165,7 +174,8 @@ MinecraftClient.exe ``` - This will load the specified configuration file -- If the file contains login / password / server ip, it will automatically connect. +- If the file contains login / server ip, it will automatically connect. +- For Microsoft accounts, authentication happens through the device code flow (no password needed in the file). ```bash MinecraftClient.exe --setting=value [--other settings]