Commit bd67ef24 authored by Stephane Sobucki's avatar Stephane Sobucki Committed by Vincent A

[hsbc] Handle relogin after otp validation

In some scenarios, relogin are triggered. If it happens inside
`handle_otp`, the otp value stored in config will not be cleared.

The consequence is that we will try to validate the otp once again, even
though we might not even be on the right page.

To fix that we reset the otp value to its default value manually.
parent 74cf825f
......@@ -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), otp)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment