fix: terminal auth — skip pre-emptive refresh, always refresh on app load for fresh cookies

This commit is contained in:
Gan, Jimmy
2026-03-20 00:21:25 +08:00
parent 59da4eb9f9
commit 0c45efc0ca
2 changed files with 7 additions and 13 deletions
+6 -8
View File
@@ -121,14 +121,12 @@
// Proxy auth not available, fall through to regular auth
}
// Regular token auth check
if (!getToken()) {
const refreshed = await tryRefreshSession();
if (!refreshed) {
loading = false;
authorized = false;
return;
}
// Regular token auth check — always try refresh to get fresh cookies
const refreshed = await tryRefreshSession();
if (!refreshed && !getToken()) {
loading = false;
authorized = false;
return;
}
try {