Reset the account pane if the login session can't be stored

If storing the API key failed, the pane kept showing the spinner and
"Waiting for login…" until the user clicked Cancel, even though the
login attempt was already over.

https://forums.zotero.org/discussion/133418/
This commit is contained in:
Dan Stillman 2026-08-29 12:09:15 -04:00
parent ace9fa0227
commit c19177a469

View file

@ -233,7 +233,14 @@ Zotero_Preferences.Sync = {
}
// Validate and store the API key
await Zotero.Sync.Runner.checkLoginSession(sessionToken, result);
try {
await Zotero.Sync.Runner.checkLoginSession(sessionToken, result);
}
catch (e) {
this._pendingSessionToken = null;
this._showLoginDefault();
throw e;
}
// Handle secmod.db issue when storing the API key
// This can happen when people have a very old profile directory (e.g., from 2013)