EnderDash
Reference

Game OAuth

Register a client and use EnderDash OpenID Connect for game-account sign-in.

A third-party app can use the EnderDash OAuth issuer to sign in a person who controls a game account. EnderDash supports Minecraft and Hytale accounts.

The issuer uses OpenID Connect with the authorization-code flow.

The issuer runs at https://oauth.enderdash.com. It is separate from the EnderDash dashboard and does not use dashboard accounts.

For sign-in with an EnderDash dashboard account, use Account OAuth. The two providers do not share clients or tokens.

A successful sign-in proves that a player completed the command on a server allowed by the verifier policy. The proof relies on that server's account authentication and reported player identity. It does not independently authenticate the player with Microsoft or Hytale.

Register a client

Each OAuth client belongs to an organization. Owners and admins can create clients.

Open Game OAuth for the organization. Then create a client.

A client has:

FieldNotes
NameA name for admins. It can contain up to 80 characters.
Redirect URIs1 to 16 exact callback URLs. Use https outside local development. The request redirect_uri must match a saved URL after normalization.
Verifier policyAllow any game server in the organization, or restrict verification to selected servers.

The client does not store scopes. An authorization request can use openid, profile, or both.

Every successful grant contains openid profile.

EnderDash returns a client_id with the edoc_ prefix. It also returns a client_secret with the edos_ prefix.

EnderDash shows the secret only once. Store it in a secure location.

If the secret becomes public, rotate it from the same page.

Sign-in flow

EnderDash supports the authorization code flow for confidential clients. It also supports PKCE when the client sends a code challenge.

  1. Send the user to /oauth2/authorize with the request parameters.
  2. Tell the user to keep the hosted page open.
  3. Tell the user to join an allowed verifier server.
  4. Tell the user to run /enderdash login <code> in chat.
  5. After the server accepts the command, EnderDash redirects to redirect_uri.
  6. Read the code and original state from the redirect.
  7. Exchange the code at /oauth2/token for an ID token and access token.
  8. Send the access token to /oauth2/userinfo to read the player claims.

Keep the page open

The authorize page waits for the in-game command. After the server accepts the command, the page redirects automatically.

Endpoints

The discovery document is at /.well-known/openid-configuration. Most clients need only the issuer URL.

EndpointMethodPurpose
/.well-known/openid-configurationGETDiscovery document.
/oauth2/jwksGETKeys that validate ID tokens.
/oauth2/authorizeGETStarts the flow and renders the hosted page.
/oauth2/tokenPOSTExchanges an authorization code for tokens.
/oauth2/userinfoGETReturns claims for a valid access token.

Supported parameters

CapabilityValues
Response typescode
Grant typesauthorization_code
Scopesopenid, profile
PKCE methodsS256, plain
Token endpoint authclient_secret_basic, client_secret_post

The /oauth2/authorize request requires response_type=code, client_id, redirect_uri, and state.

The request can include scope, nonce, code_challenge, and code_challenge_method. EnderDash gets the organization from the unique client_id.

Claims

The ID token and /oauth2/userinfo response identify the verified player. They do not identify an EnderDash dashboard user.

ClaimDescription
subStable identifier for the game account within the organization and game.
preferred_usernameCurrent game account name.
gameGame that owns the account, currently minecraft or hytale.
game_account_nameCurrent game account name.
game_account_idGame account UUID.
organization_idOrganization that owns the OAuth client and allowed verifier servers.
verified_by_server_idServer that completed the in-game proof. This value is not part of sub.

Token exchange example

Send a form-encoded request from your backend. Use the same callback URI saved during authorization. Use its normalized form consistently, including a trailing slash when present.

curl 'https://oauth.enderdash.com/oauth2/token' \
  --user '<client-id>:<client-secret>' \
  --data-urlencode 'grant_type=authorization_code' \
  --data-urlencode 'code=<authorization-code>' \
  --data-urlencode 'redirect_uri=https://example.com/callback' \
  --data-urlencode 'code_verifier=<original-pkce-verifier>'

The response contains access_token, id_token, token_type, expires_in, and scope. token_type is Bearer, expires_in is 900, and scope is openid profile. Omit code_verifier only when the authorization request did not use PKCE. Prefer S256 for new integrations and set code_challenge_method explicitly.

curl 'https://oauth.enderdash.com/oauth2/userinfo' \
  -H 'Authorization: Bearer <access-token>'

Validate the callback state before you exchange its code. Validate the ID token's RS256 signature, issuer, audience, expiration, and original nonce through your OIDC library. Use the issuer and sub together as the account key. Player names can change.

Game tokens do not authenticate the dashboard HTTP API.

Token lifetimes

The hosted authorization session lasts 10 minutes. The returned authorization code lasts 90 seconds and permits one exchange. ID tokens are valid for 10 minutes. Access tokens are valid for 15 minutes.

A failed redirect or PKCE check can consume the authorization code. Start a new flow instead of retrying that code.

The issuer does not provide refresh tokens. Start a new sign-in flow after a token expires.

Troubleshooting

ProblemCheck
Return address rejectedClient enabled and callback saved under the organization's Game OAuth page
Security check failedBrowser can reach Cloudflare Turnstile
Server cannot verify the codeCorrect organization, allowed server, active challenge, connected agent
Browser does not redirectHosted page remains open and its live connection works
invalid_clientGame client ID and current game client secret
invalid_grantCode age, prior use, exact callback URI, client ID, and PKCE verifier
invalid_tokenAccess token from this issuer, within its lifetime

Secret rotation and client disablement affect new exchanges. Previously issued access tokens can remain valid until expiration.

Was this page helpful?

Send a quick note if anything is missing or unclear.

Last updated on

On this page