Created
January 7, 2014 23:56
-
-
Save sigmavirus24/8309169 to your computer and use it in GitHub Desktop.
Two-Factor Authentication in github3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import github3 | |
def my_two_factor_callback(): | |
auth_code = raw_input('Please enter your 2FA code: ') | |
return auth_code | |
g = github3.GitHub() | |
g.login( | |
'sigmavirus24', | |
'fake_password', | |
two_factor_callback=my_two_factor_callback | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment