fix: degrade auth profile on backend outage

This commit is contained in:
2569718930@qq.com
2026-05-30 15:06:22 +08:00
parent c79619898a
commit 853a652e9b
3 changed files with 135 additions and 40 deletions
@@ -255,7 +255,8 @@ export function runTests() {
);
assert(
authMeRouteSource.includes("if ((res.status === 401 || res.status === 403) && auth.authUserId)") &&
authMeRouteSource.includes("degraded_reason: `backend_${res.status}`") &&
authMeRouteSource.includes("degradedAuthProfileResponse") &&
authMeRouteSource.includes("reason: `backend_${res.status}`") &&
authMeRouteSource.includes("subscription_active: null"),
"auth profile proxy must preserve authenticated identity with unknown subscription on backend 401/403 instead of forcing a false paywall",
);