DEV Community 👩‍💻👨‍💻

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

j_sakamoto profile image
jsakamoto Author

I'm not sure that how does Facebook 2 factor work. I have not e2e test for Facebook 2 factor.

Could you explain more details of what you ran into?

What did you do, and what did you get as a result?

derekantrican profile image
Derek Antrican

It works similarly to setting up 2-factor for a Google Account. If you select "Code Generator" they present you with a 2-factor QR code.

In order to get the secret for my Google Account 2-factor, I scanned the Google Account QR code with a QR code scanner and stripped out the secret parameter. This secret worked for your steps in your article.

For Facebook, I tried to do the same thing, but it's not generating the right 2-factor codes, which leads me to believe the secret or the steps or something else is wrong.

Was wondering if you have any insight