From e00f651ddb6a2381e4aa62b3c4ea99b65200f238 Mon Sep 17 00:00:00 2001 From: Vadym Tyemirov Date: Mon, 5 Jan 2026 18:12:53 -0800 Subject: [PATCH] Fix auth nonce mismatch after logout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dispose and reset Google Identity controller on sign out so it gets recreated with a fresh nonce. Remove fallback nonce request during credential exchange that caused nonce mismatch errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- frontend/js/app.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/js/app.js b/frontend/js/app.js index 8858c70..e823869 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -392,16 +392,10 @@ function gravityApp(appConfig) { return; } if (!this.authNonceToken) { - try { - this.authNonceToken = await this.tauthSession.requestNonce(); - } catch (error) { - logging.error("Failed to request auth nonce", error); - this.authControls?.showError(ERROR_AUTHENTICATION_GENERIC); - return; - } - } - if (!this.authNonceToken) { + logging.error("Auth nonce missing during credential exchange - reinitializing"); this.authControls?.showError(ERROR_AUTHENTICATION_GENERIC); + this.authController?.dispose(); + this.authController = null; return; } try { @@ -470,6 +464,8 @@ function gravityApp(appConfig) { } if (this.authController) { this.authController.signOut(reason); + this.authController.dispose(); + this.authController = null; } else { this.dispatchAuthSignOut(reason); }