Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: 2FA support for headless mode #617

Open
timbru31 opened this issue Mar 27, 2021 · 11 comments · May be fixed by #636
Open

Feature Request: 2FA support for headless mode #617

timbru31 opened this issue Mar 27, 2021 · 11 comments · May be fixed by #636

Comments

@timbru31
Copy link
Contributor

Currently fairgame does not work correctly when running on a 2FA protected account in headless mode as it expects the user to enter the OTP code in the browser windows itself.

Ideally, fairgame would prompt the user for the OTP from the Python CLI and then pass the value via chromedriver onto the page. This should basically be something like otp_field.send_keys(otp_input + Keys.RETURN) (pseudo code)

@DakkJaniels
Copy link
Collaborator

DakkJaniels commented Mar 27, 2021

Makes sense, please make a PR to implement.

@timbru31
Copy link
Contributor Author

Already on it 👍

timbru31 added a commit to timbru31/fairgame that referenced this issue Apr 1, 2021
feat: sends a notification if OTP input is required
feat: tries to set the "Do not ask for OTP on this device" flag

This closes Hari-Nagarajan#617
@timbru31 timbru31 linked a pull request Apr 1, 2021 that will close this issue
timbru31 added a commit to timbru31/fairgame that referenced this issue Apr 14, 2021
feat: sends a notification if OTP input is required
feat: tries to set the "Do not ask for OTP on this device" flag

This closes Hari-Nagarajan#617
timbru31 added a commit to timbru31/fairgame that referenced this issue Apr 16, 2021
feat: sends a notification if OTP input is required
feat: tries to set the "Do not ask for OTP on this device" flag

This closes Hari-Nagarajan#617
@digitalentropy
Copy link

It should also be possible to implement a built-in TOTP generator where the user can save their TOTP secret in the credential file and it handled automatically.

There are plenty of python TOTP generators that could handle this.

@timbru31
Copy link
Contributor Author

Have fun explaining the user how to get the QR code encoded data into fairgame. While of course this is possible, I'd vote against this. Users already struggle to understand what the test flag is.

@digitalentropy
Copy link

Unless I am missing something there is a "Can't scan the barcode?" link at the bottom of every TOTP QR that I've had to use, including Amazon's. They can just add a new authenticator app and copy the secret out of that.

I ran into an issue today where I fairgame was logged in, eventually got a hit, successfully added it to cart, but Amazon decided to prompt for OTP.

Adding built-in 2FA support would be the only way to get around this if it starts increasing in frequency.

@DakkJaniels
Copy link
Collaborator

@digitalentropy please submit a PR for it. Thanks.

@timbru31
Copy link
Contributor Author

They can just add a new authenticator app and copy the secret out of that.

99,99% of the users have TOTP setup, aka the QR code is no longer displayed. Correct me if I'm wrong, but the most famous apps such as Google Authenticator, Microsoft Authenticator nor Authy allows the re-display of the QR code or secret.

@digitalentropy
Copy link

They can just add a new authenticator app and copy the secret out of that.

99,99% of the users have TOTP setup, aka the QR code is no longer displayed. Correct me if I'm wrong, but the most famous apps such as Google Authenticator, Microsoft Authenticator nor Authy allows the re-display of the QR code or secret.

I've confirmed that Amazon allows the user to add multiple authenticator apps, so one could simply add a new one for fairgame.

Unfortunately I don't have time at the moment to write the code for it. I was simply providing feedback that I felt was practical and useful. That said, if someone who does have the time has an interest in doing so, I think it's a very worthwhile idea.

@Cr4z33
Copy link

Cr4z33 commented Jul 16, 2021

Is this still not being implemented? 😥

@DakkJaniels
Copy link
Collaborator

It's in PR #636. You can load that if you need it.

@Cr4z33
Copy link

Cr4z33 commented Jul 18, 2021

@DakkJaniels thanks, but I am not quite sure I understood properly. 😅

Do I have to add/edit anything in my (Docker running) fairgame or do I have to downgrade it to a specific release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants