OAuthMC documentation
OAuthMC verifies that a player owns a Minecraft Java Edition account by having them join a Minecraft server. These pages cover running, integrating, configuring, operating, and contributing to OAuthMC.
Pages#
- Getting started: build the container, create a ticket, join with Minecraft, and redeem a code end to end.
- Integrating OAuthMC: connect a platform with code mode or link mode, build the confirmation page, poll status, and handle errors.
- Configuration: every
OAUTHMC_*environment variable, its default, its bounds, and the message templates. - HTTP API: endpoint reference, schemas, status codes, and error codes, alongside openapi.yaml.
- Deploying: Docker Compose, DNS SRV records, TCP proxies, health checks, upgrades, and graceful shutdown.
- Security model: threat model, session binding, tenant isolation, rate limiting, and cryptography.
- Minecraft protocol: supported versions, wire-level quirks, and how link mode works in the Configuration state.
- TypeScript SDK: zero-dependency client library (
oauthmc) for Node.js, Deno, Bun, and Cloudflare Workers. - Contributing: building from source, running the Rust tests and client matrix, and cutting a release.
Glossary#
- Platform: the web application or backend service that calls the OAuthMC HTTP API to verify players.
- Player: the person proving ownership of a Minecraft Java Edition account.
- Ticket: a short-lived, in-memory verification request created by a platform for one Minecraft username.
- Code: a single-use 8-character secret (
XXXX-XXXX) generated when a player completes online-mode login. - Code mode: the default verification flow. OAuthMC disconnects the player during Login with their code, and the player enters that code on the platform.
- Link mode: the verification flow for Minecraft 1.21.6 and later. OAuthMC holds the player in the Configuration state and shows an in-game dialog with Open link and Copy code buttons. Older clients fall back to code mode.
- Tenant: the isolated scope bound to one bearer API key in
OAUTHMC_API_KEYS. One tenant cannot read, redeem, or delete another tenant's tickets.