diff --git a/modules/hsbc/browser.py b/modules/hsbc/browser.py index 980ff0586a27f6c6d0642ef500a377e8453e7bd2..7f240ac3482c5b276d860ffd7438a0644f2b2960 100644 --- a/modules/hsbc/browser.py +++ b/modules/hsbc/browser.py @@ -170,6 +170,12 @@ def load_state(self, state): def handle_otp(self): otp = self.config['otp'].get() + + # In some scenarios relogin will be triggered (see AppGonePage). + # We need to set config['otp'] to None, otherwise we will try to validate + # the otp once again even though we might not be on the right page anymore. + self.config['otp'].set(self.config['otp'].default) + self.page.login_with_secure_key(self.secret, otp) self.end_login()