fix(files): ending every session and making a token lock the user without holding up rows that refer to it

This commit is contained in:
2026-10-15 06:05:51 +02:00
parent a248ca6c13
commit 27427eef32
4 changed files with 81 additions and 8 deletions
+3 -2
View File
@@ -387,7 +387,8 @@ export function SignInMethods({ me }: { me: Me }) {
setSessBusy(true);
try {
await api.logoutOthers();
// Every API token went with the other sessions: the Tokens tab must not show them from cache.
// Every API token went with the other sessions: the Tokens tab asks again when it next opens,
// rather than trusting its cached list for another half minute.
void qc.invalidateQueries({ queryKey: qk.apiTokens() });
notify({ level: "success", message: t("settings.account.sessions.done") });
} catch (e) {
@@ -407,7 +408,7 @@ export function SignInMethods({ me }: { me: Me }) {
setCurrent("");
setNext("");
// Refresh `me` so has_password flips and the section switches to "Change password". Every API
// token went with the old password, so the Tokens tab must not show them from cache either.
// token went with the old password, so the Tokens tab asks again when it next opens, too.
void qc.invalidateQueries({ queryKey: qk.apiTokens() });
await qc.invalidateQueries({ queryKey: qk.me() });
notify({