debug: add logging to test-auth credential loading

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
patrick-motsch 2026-02-16 23:45:47 +01:00
parent bddb039bde
commit 1b2ca9512f

View file

@ -735,9 +735,16 @@ async def testAuth(
if systemBot:
email = systemBot.get("email")
encryptedPwd = systemBot.get("encryptedPassword")
logger.info(f"[test-auth] System bot found: email={email}, hasEncryptedPwd={bool(encryptedPwd)}")
if encryptedPwd:
from modules.shared.configuration import decryptValue
password = decryptValue(encryptedPwd, userId=str(context.user.id), keyName="systemBotPassword")
try:
from modules.shared.configuration import decryptValue
password = decryptValue(encryptedPwd, userId=str(context.user.id), keyName="systemBotPassword")
logger.info(f"[test-auth] Password decrypted successfully, length={len(password) if password else 0}")
except Exception as e:
logger.error(f"[test-auth] Password decryption failed: {e}")
else:
logger.warn(f"[test-auth] No active system bot found for mandate {mandateId}")
# Forward to browser bot service
browserBotUrl = effectiveConfig._getEffectiveBrowserBotUrl()