DEV Community

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

Collapse
 
j_sakamoto profile image
jsakamoto

Ok, I'll try to reproduce and resolve your problem.

But so I'm busy few weeks, my response will be late.

Collapse
 
amitaswani27 profile image
amit

Hi..thanks for your response!

Few weeks !! oh okay...I was actually working on it but unable to proceed further.

I'll be waiting for your response..request you to kindly revert at your earliest convenience. Meanwhile, if you have any suggestion which I can look into kindly suggest, thanks very much for your beautiful support!!

Thread Thread
 
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.