DEV Community

Discussion on: Selenium Testing - How to sign in to Two-factor authentication?

 
j_sakamoto profile image
jsakamoto • Edited

I could compute MFA code for my AWS account by that Java sample code.

Question: Did you rewrite the sample source code at "2FA secret key" row with your own MFA secret key?

See also: gist.github.com/jsakamoto/54f77ae1...

You should capture the MFA secret key of your AWS account in an enabling MFA steps.

In this sample case above, the sample code should be bellow.

String otpKeyStr = "B7NLNKSUKGDLE3P5TCF6X2VCA6UWEK7IPPO4BNMQMF4S4TICWTIX76SVXNXCGTBT"; // <- this 2FA secret key.