0

I tried install 'Google Authentication' and 'Authy' to use 2-step verification, but the both don't give-me the TOTP key ...

The code for input the 6 digits i found here

I tried get all TOTP keys using this but i receive : 'secret=undefined'

What i need? I need some method to get the 6 digits of authentication or some method to simply get the TOTP key, as I just need to implement it in the code.

Does anyone have any idea how I can do this? I'm using Python + Selenium

    1 Answer 1

    2

    Try the below simple code and check if you are providing the right secret.

    from pyotp import * totp = TOTP("16 chars secret code goes here") token = totp.now() print (token) 
    7
    • Try this out in a simple .py file to validate the set is correct.
      – supputuri
      CommentedOct 6, 2019 at 1:49
    • but how i get the secret key ?? i don't knowCommentedOct 6, 2019 at 2:06
    • Did you already configured the google authenticator on a device?
      – supputuri
      CommentedOct 6, 2019 at 2:11
    • Yes, I have google authenticator on my device and it shows me the 6 digits every 30 seconds. But if google authenticator is not compatible with selenium I can switch to any other application without any problemsCommentedOct 6, 2019 at 3:39
    • you can click on Import Backup in the google auth and get the security code from the file.
      – supputuri
      CommentedOct 6, 2019 at 4:12

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.