Skip to content
Dashboard

Minekube accounts

View as Markdown

A Minekube account is a Minecraft: Java Edition account: its UUID and current name, as Mojang authenticated them. There is no separate sign-up, no email address and no password. An account owns networks.

Everyone who runs a Minecraft network already has a Minecraft account, and Mojang already checks it every time they join an online-mode server. Building on that identity means one account less to create and one password less to leak. It also makes the account the same identity players know you by in game.

The Minekube hub is a Minecraft server that Minekube runs in online mode, so Mojang checks every player who joins it. That check is the login.

  1. You join the hub with Minecraft and ask for a code, with [Log in] in the chat.
  2. The hub asks the Minekube API for a one-time code for your account. Only Minekube’s login servers may ask for one.
  3. You give the code to mk login, or to your coding agent.
  4. mk login redeems the code, once, for a session.

The code appears in your own game, so nobody can push a login of theirs onto you. Create a network shows the steps.

A session is a pair of tokens: an access token for requests, which runs out soon, and a refresh token, which mk uses once to get the next pair. mk keeps the session in its home folder and refreshes it by itself.

  • A refresh token used twice ends its session, because then someone else has it.
  • The Minekube API stores only hashes of codes and tokens, so a copy of its storage signs nobody in.
  • Every request is checked against the store, so a session that ended stops working at once. The API needs no signing key for sessions.
  • A session ends after a long time without use, or a fixed time after the login at the latest. Then you join the hub again. Limits lists both times.

An account creates networks and owns them. As the owner, it lets servers in, keeps trust rules, lists the members and deploys code to them, for its own networks only.

The Minekube API’s admins are not accounts. They are operators of an API, such as Minekube for its own or you for one you host yourself, and they act with short-lived tokens from an issuer the API trusts.

Accounts, the hub login, sessions and network ownership are built, in preview on staging. Not built yet: logging in on the web, and tokens for CI that act as an account.

Was this helpful?