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
This commit is contained in:
copilot-swe-agent[bot] 2026-03-23 15:59:35 +00:00
parent 94c6425a2b
commit a9930b0a67
3 changed files with 35 additions and 8 deletions

View file

@ -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) - [Get alerted on certain keywords](chat-bots.md#alerts)
- [Auto Respond](chat-bots.md#auto-respond) - [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) - [Anti AFK](chat-bots.md#anti-afk)
- [Auto Relog](chat-bots.md#auto-relog) - [Auto Relog](chat-bots.md#auto-relog)
- [Script Scheduler](chat-bots.md#script-scheduler) - [Script Scheduler](chat-bots.md#script-scheduler)

View file

@ -67,17 +67,33 @@ Coordinate = { x = 145, y = 64, z = 2045 }
- **Description:** - **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:** - **Format:**
`Account = { Login = "<email>", Password = "<password>" }` `Account = { Login = "<email>" }`
- **Type:** `inline table` - **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` #### `Server`

View file

@ -121,11 +121,20 @@ MinecraftClient.exe --section.setting=value [--other settings]
MinecraftClient.exe <settings-file.ini> [--other settings] MinecraftClient.exe <settings-file.ini> [--other settings]
``` ```
<div class="custom-container tip"><p class="custom-container-title">Tip</p>
**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.**
</div>
Examples: Examples:
```bash ```bash
# Logging in as a user: notch, with a password: password123 onto a server with the ip: mc.someserver.com:25565 # Microsoft account: connect to a server (you will sign in via device code in your browser)
MinecraftClient.exe notch password123 mc.someserver.com:25565 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 # Overriding a setting from MinecraftClient.ini using a command-line parameter
MinecraftClient.exe --debugmessages=false MinecraftClient.exe --debugmessages=false
@ -150,7 +159,7 @@ MinecraftClient.exe <login> <password> <server>
- This will automatically connect you to the chosen server. - This will automatically connect you to the chosen server.
- You may omit password and/or server to specify e.g. only the login - 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. - To specify offline mode with no password, use `-` as password.
```bash ```bash
@ -165,7 +174,8 @@ MinecraftClient.exe <myconfig.ini>
``` ```
- This will load the specified configuration file - 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 ```bash
MinecraftClient.exe --setting=value [--other settings] MinecraftClient.exe --setting=value [--other settings]