This page calls your Cloudflare Worker at POST /api/v2/auth/login with
{ "game_token": "…" }. The Worker adds MGG_API_KEY and forwards to MGG. A 200 response
includes uid, access_token, refresh_token, and nickname.
Use your Worker hostname (ends with .workers.dev or your Worker custom domain) —
not this Pages site URL (*.pages.dev). Pages only serves static files; posting to
Pages often returns HTTP 405 with an empty body, so you will never see MGG errors like “token
expired” until the request hits the Worker.