04/17/2026 fix sidebar Sharing and Emergency Access 401 error issues
This commit is contained in:
@@ -1494,7 +1494,13 @@ const Vault = (() => {
|
|||||||
const timer = setTimeout(resolve, 800);
|
const timer = setTimeout(resolve, 800);
|
||||||
window.addEventListener('passkeeper:ext-login', () => { clearTimeout(timer); resolve(); }, { once: true });
|
window.addEventListener('passkeeper:ext-login', () => { clearTimeout(timer); resolve(); }, { once: true });
|
||||||
});
|
});
|
||||||
if (!sessionStorage.getItem('access_token')) { window.location.href = '/login'; return; }
|
|
||||||
|
// Still no token — try a silent refresh using the persisted refresh_token
|
||||||
|
// before giving up and redirecting. This handles hard-refresh / new-tab scenarios.
|
||||||
|
if (!sessionStorage.getItem('access_token')) {
|
||||||
|
const refreshed = await tryRefreshToken();
|
||||||
|
if (!refreshed) { window.location.href = '/login'; return; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vault
|
// Vault
|
||||||
|
|||||||
Reference in New Issue
Block a user