473407174b
PR #61281 removed the client-side X-Hermes-Session-Token requirement from the dashboard OAuth mutation calls so cookie-authenticated hosted/mobile sessions can start provider logins. That change is safe only because the server still gates those endpoints (gated_auth_middleware cookie check + _require_token). The PR's api.test.ts suite mocks fetch and only asserts client behavior, so a re-break of the gated-mode cookie gate would pass CI unnoticed. Add gated-mode TestClient tests asserting POST /api/env/reveal and the OAuth mutation endpoints (disconnect/start/submit/cancel) return 401 with no session cookie. Mutation-verified: neutering both the middleware gate and _require_token flips all five to 200.