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

Implement 2-factor authentication during login (by email) #64

Merged
merged 1 commit into from Jun 10, 2021

Conversation

aduffeck
Copy link
Contributor

@aduffeck aduffeck commented Jun 9, 2021

This commit handles the case where 2fa is required by the server.

An email code is requested from the server which can then be entered on the command line to complete the 2fa flow.

Fixes #37, #46 and #55.

@rbignon
Copy link
Owner

rbignon commented Jun 10, 2021

Hello,

Thank you for your contribution. I have no way to test it, but it seems good (and at worst it wouldn't break anything if it does not work).

@rbignon rbignon merged commit b15ad96 into rbignon:master Jun 10, 2021
@securitygeneration
Copy link

@aduffeck I'm getting an error trying to log in to an account with 2FA:

Requesting 2fa code...
Enter auth code: Traceback (most recent call last):
  File "/usr/src/app/./doctoshotgun.py", line 627, in <module>
    sys.exit(Application().main())
  File "/usr/src/app/./doctoshotgun.py", line 529, in main
    if not docto.do_login():
  File "/usr/src/app/./doctoshotgun.py", line 215, in do_login
    code = input("Enter auth code: ")
EOFError: EOF when reading a line

@aduffeck
Copy link
Contributor Author

@securitygeneration how do you run doctoshotgun? It looks like it's something non-interactive that doesn't support input?

@securitygeneration
Copy link

I'm running it via Docker (basically following the readme instructions)

@aduffeck
Copy link
Contributor Author

@securitygeneration I see. can you please try docker run -it instead of just docker run? That should fix the problem for you.

I'll prepare a pull request to adapt the readme accordingly

@aduffeck
Copy link
Contributor Author

I just created the readme PR at #77

@securitygeneration
Copy link

Yep, the -it runs it interactive, thanks :)

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 this pull request may close these issues.

Error 401
3 participants