Handling NeedInteractiveFor2FA exception in a script
This is more a question than a issue.
I have a personal script based on woob and Bank capability.
What is the proper way to deal with the NeedInteractiveFor2FA()
exception?
Basically, below is (a part of) my script :
w = Woob(backends_filename=decrypted_bck_file)
w.setup_nss()
for account in w.iter_accounts():
assert isinstance(account, Account)
headers_values[account.id] = account.balance
NeedInteractiveFor2FA()
is raised by w.iter_accounts()
If I pass silently this exception, I get the secure code on my phone. I can prompt the user (me actually) to type this code. But what should I do with this after?
I have cloned woob project from gitlab to investigate the question, but as a half-newbie I am getting lost.
Thank you in advance.
Edited by Vincent Raspal