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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user