fix(auth): handle expired session sources before permissions
Generic Container CI/CD / test-build-publish (push) Successful in 57s
Frontend CI/CD v2 / build-test-publish-and-deploy (push) Successful in 57s

The previous fix only prioritized authStore inside the route guard, so an unauthenticated NextAuth session or a suppressed access-context 401 still collapsed into an empty permission set. Propagate both authentication signals before authorization so expired sessions consistently reauthenticate.
This commit is contained in:
2026-09-09 15:28:53 +08:00
parent b04378397c
commit 3ebe3328aa
5 changed files with 161 additions and 7 deletions
@@ -657,7 +657,6 @@ export const SystemAdminPanel = () => {
try {
const adminResponse = await apiFetch(`${config.BACKEND_URL}/api/v1/admin/users/me`, {
projectHeaderMode: "omit",
skipAuthRedirect: true,
});
if (!adminResponse.ok) {
if (!cancelled) {