API reference
HTTP endpoints exposed by BeaconAuth.
Base paths
The API is served at:
/v1/*(direct)/api/v1/*(when mounted under/api)
Core endpoints
Sessions
POST /v1/loginPOST /v1/registerPOST /v1/refreshPOST /v1/logoutGET /v1/user/meGET /v1/user/me/avatarPOST /v1/user/change-passwordPOST /v1/user/change-usernamePOST /v1/user/profile
Example: POST /v1/login
{
"username": "player123",
"password": "secure_password"
}Minecraft authentication (OIDC)
The Minecraft mod uses a standard OIDC authorization-code + PKCE flow:
GET /.well-known/openid-configuration— OIDC discoveryGET /v1/oidc/authorize— authorization endpoint (the mod opens this via the login UI)POST /v1/oidc/complete— SPA completes the authorization, redirecting back to the modPOST /v1/oidc/token— token endpoint (client-secret-less, PKCE-bound)GET /v1/oidc/userinfo— userinfo endpoint (access-token authorized)
Minecraft identity
When a Mojang-verified premium player is served on the online-mode bypass path, the mod may resolve whether a Mojang UUID is bound to a BeaconAuth account and how to handle its identity:
GET /v1/minecraft/lookup?uuid=<mojangUuid>— authenticated with theX-Minecraft-Authshared secret (MINECRAFT_LOOKUP_SECRET). Returns{ bound, identity_mode, user_subject, textures_value, textures_signature }.GET /v1/minecraft/identity-mode— the current user's effective identity preference.POST /v1/minecraft/identity-mode— set the current user's preference (mojang/legacy).
OAuth
POST /v1/oauth/startPOST /v1/oauth/link/startGET /v1/oauth/callback
Supported providers: github, google, microsoft (Entra ID), and minecraft (Microsoft
consumer + Xbox, reusing the MICROSOFT_CLIENT_ID/MICROSOFT_CLIENT_SECRET credentials). The
minecraft provider binds the real Mojang UUID as the provider identity.
Passkeys (WebAuthn)
POST /v1/passkey/register/startPOST /v1/passkey/register/finishPOST /v1/passkey/auth/startPOST /v1/passkey/auth/finishPOST /v1/passkey/deleteGET /v1/passkey/listDELETE /v1/passkey/{id}
Identities
GET /v1/identitiesDELETE /v1/identities/{id}
Configuration and JWKS
GET /v1/configGET /.well-known/jwks.json
Admin
POST /v1/admin/migrations/up
Notes
- Session endpoints set HttpOnly cookies for access/refresh tokens.
- JWTs are signed with ES256 and published via JWKS.
- Some endpoints require an authenticated session.