# 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](https://docs.sculk.network/nightly/oauthmc/getting-started.md): build the container, create a ticket, join with Minecraft, and redeem a code end to end.
- [Integrating OAuthMC](https://docs.sculk.network/nightly/oauthmc/integrating.md): connect a platform with code mode or link mode, build the confirmation page, poll status, and handle errors.
- [Configuration](https://docs.sculk.network/nightly/oauthmc/configuration.md): every `OAUTHMC_*` environment variable, its default, its bounds, and the message templates.
- [HTTP API](https://docs.sculk.network/nightly/oauthmc/api.md): endpoint reference, schemas, status codes, and error codes, alongside [openapi.yaml](https://docs.sculk.network/nightly/oauthmc/openapi.md).
- [Deploying](https://docs.sculk.network/nightly/oauthmc/deploy.md): Docker Compose, DNS SRV records, TCP proxies, health checks, upgrades, and graceful shutdown.
- [Security model](https://docs.sculk.network/nightly/oauthmc/security.md): threat model, session binding, tenant isolation, rate limiting, and cryptography.
- [Minecraft protocol](https://docs.sculk.network/nightly/oauthmc/protocol.md): supported versions, wire-level quirks, and how link mode works in the Configuration state.
- [TypeScript SDK](https://docs.sculk.network/nightly/oauthmc/sdk/js.md): zero-dependency client library (`oauthmc`) for Node.js, Deno, Bun, and Cloudflare Workers.
- [Contributing](https://docs.sculk.network/nightly/oauthmc/contributing.md): 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.
