Files
2026-09-29 22:45:56 +07:00

1.5 KiB

OAuth

For the auth service API and login flow requirements, see Auth server requirements.

Server configuration

The mod uses Cloth Config AutoConfig and creates config/oauth.json on first server startup. Install Cloth Config for Fabric on the server, then set the WebSocket URL, server ID, and per-server credential in that file:

{
  "websocketUrl": "wss://minecraft.csui.dev/api/v1/minecraft/ws",
  "serverId": "your-server-id",
  "serverCredential": "your-server-credential"
}

ws:// URLs are also accepted for local development. They do not encrypt the connection, so use wss:// for production. If the file was incomplete when the server started, /login reloads it and queues the request while the WebSocket connects. Check the server log for the exact config path and any missing fields.

Operators can stand at the desired waiting location and run /setloginspawn. The location, dimension, and view direction are saved to config/oauth.json. Players who join before linking are sent there and kept in place. After login succeeds, each player returns to the position and dimension where they joined.

Setup

For setup instructions, please see the Fabric Documentation page related to the IDE that you are using.

License

This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.