Managing Accounts
Shard uses Microsoft OAuth to authenticate with Minecraft. You need to add at least one account to play.
Adding an Account
- Click the Accounts button in the sidebar (or the account avatar)
- Click Add Account
- A device code will appear - copy it
- Click the link to open Microsoft’s login page
- Paste the code and sign in with your Microsoft account
- Once authenticated, Shard will fetch your Minecraft profile
Switching Accounts
If you have multiple accounts:
- Click the account avatar in the sidebar
- Select a different account from the list
- The active account is shown with a checkmark
Account Details
Click on an account to view:
- Username: Your Minecraft username
- UUID: Your unique player identifier
- Skin: Your current Minecraft skin
You can also upload a new skin from this view.
Removing an Account
- Go to Accounts view
- Click the … menu on an account
- Select Remove Account
This only removes the account from Shard; it doesn’t affect your Microsoft account.
Token Storage
Account tokens are stored in ~/.shard/accounts.json. This file contains:
- Access token: Short-lived token for API calls
- Refresh token: Long-lived token to get new access tokens
Tokens are refreshed automatically when needed. If you ever need to re-authenticate, remove and re-add the account.
CLI Authentication
You can also add accounts via the CLI:
# Start device code flow
shard auth login
# List accounts
shard auth list
# Set active account
shard auth use <username>See the CLI Reference for more commands.
Last updated on