diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-08-18 15:39:09 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-08-18 15:45:53 -0700 |
| commit | 696be76bda4c8bf8ed0fc7d0cff2c1358f98aa93 (patch) | |
| tree | bf27d4be4475a54fdc43e1b8bdbfae5171c42d50 | |
| parent | 5fbe4e8fbbbb5da0b364d458a77925a5f89264e5 (diff) | |
fix: create auth.json if missing
| -rwxr-xr-x | mcsh.sh | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -16,6 +16,10 @@ function auth ( XSTS_TOKEN_URL="https://xsts.auth.xboxlive.com/xsts/authorize" MC_AUTH_URL="https://api.minecraftservices.com/authentication/login_with_xbox" + if ! [[ -e auth.json ]]; then + printf '{}\n' > auth.json + fi + function login ( printf 'getting device code\n' >&2 res="$(curl -s -X POST "$DEVICE_CODE_URL" -H 'Content-Type: application/x-www-form-urlencoded' -d "client_id=$CLIENT_ID&scope=XboxLive.signin%20offline_access")" |