Open philiplin2345 opened 4 months ago
I have not used totp in firstrade at all so I am not sure what the request looks like. I would have to snoop the network traffic and pull the code with something like this. https://pyauth.github.io/pyotp/ Do you still have to use a pin when you login with this method?
with pyotp you can use the QR code/string that is provided when you first set up 2fa
pyotp.TOTP(<2FA string>).now()
will return the pin code that you can send to firstrade
When I get some time, I will try to get this put in there.
This is being worked on in the "mfa" branch.
I'm using google authenticator and tried to add mfa to the existing codebase but failed in attempt. The code below is what I tried to insert into the login. Could you suggest what to do to correctly implement the mfa? Thanks!
However print("mfa response: %s", response.text) gave me the response