From 70367afbda923fe42f884b16c398843ca4ef5373 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Tue, 23 Dec 2025 00:21:18 +0800 Subject: [PATCH] fix caching totp value in the fallback mode (#4354) --- skyvern/core/script_generations/script_skyvern_page.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skyvern/core/script_generations/script_skyvern_page.py b/skyvern/core/script_generations/script_skyvern_page.py index 9172b866..798a8574 100644 --- a/skyvern/core/script_generations/script_skyvern_page.py +++ b/skyvern/core/script_generations/script_skyvern_page.py @@ -411,12 +411,13 @@ class ScriptSkyvernPage(SkyvernPage): task_id = context.task_id workflow_run_id = context.workflow_run_id organization_id = context.organization_id - value = get_actual_value_of_parameter_if_secret(workflow_run_id, value) + original_value = value + value = get_actual_value_of_parameter_if_secret(workflow_run_id, original_value) # support TOTP secret and internal it to TOTP code is_totp_value = value == "BW_TOTP" or value == "OP_TOTP" or value == "AZ_TOTP" if is_totp_value: - value = generate_totp_value(context.workflow_run_id, value) + value = generate_totp_value(context.workflow_run_id, original_value) elif (totp_identifier or totp_url) and organization_id: totp_value = await poll_otp_value( organization_id=organization_id,