From a2a8f9de74ad2ac4488781c9741209eb2c057351 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Fri, 3 May 2024 18:44:48 -0400 Subject: [PATCH] Fix cache state --- packages/backend/src/routers/auth/configure-2fa.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/routers/auth/configure-2fa.js b/packages/backend/src/routers/auth/configure-2fa.js index bc235c50..e6c67d98 100644 --- a/packages/backend/src/routers/auth/configure-2fa.js +++ b/packages/backend/src/routers/auth/configure-2fa.js @@ -73,6 +73,8 @@ module.exports = eggspress('/auth/configure-2fa/:action', { `UPDATE user SET otp_enabled = 0, otp_recovery_codes = '' WHERE uuid = ?`, [user.uuid] ); + // update cached user + req.user.otp_enabled = 0; return { success: true }; };