fix(bootstrap): site-relay-register.js used the wrong login field for jump-host

jump-host's local admin login (via @simpleworkjs/oidc-client's shared
router) expects `username`, not `uid` -- sso-manager-node's own
/api/auth/login (used by site-join.js) is the one that expects `uid`.
Caught live: the script's login call to jump-host silently 401'd with
`uid`. Confirmed against a real jump-host container that `username`
succeeds.
This commit is contained in:
2026-08-10 21:20:33 -04:00
parent 4f09354e32
commit 577c264a6a
+5 -1
View File
@@ -76,7 +76,11 @@ async function main() {
const loginRes = await fetch(`${JUMP_INTERNAL}/api/auth/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ uid: jumpAdminUser, password: jumpAdminPass }),
// jump-host's login route (@simpleworkjs/oidc-client's shared router)
// expects `username`, not `uid` -- unlike sso-manager-node's own
// /api/auth/login (see site-join.js). Confirmed against a real running
// jump-host container; `uid` here just silently 401s.
body: JSON.stringify({ username: jumpAdminUser, password: jumpAdminPass }),
});
if (!loginRes.ok) {
throw new Error(`jump-host admin login failed (${loginRes.status}): ${await loginRes.text().catch(() => '')}`);