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

2FA : login does not trigger the SMS code send #387

Closed
ferllings opened this issue Jun 10, 2015 · 8 comments
Closed

2FA : login does not trigger the SMS code send #387

ferllings opened this issue Jun 10, 2015 · 8 comments

Comments

@ferllings
Copy link

When the 2FA is used, the SMS code is not sent, when the login function is executed.

http://github3py.readthedocs.org/en/master/examples/two_factor_auth.html

After some testing with the api, the code is only sent when calling the authorizations url with PUT method:
curl -X PUT -v -u : https://api.github.com/authorizations

@sigmavirus24
Copy link
Owner

Is this documented anywhere on https://developer.github.com/? If not, then file a bug with the API because that's the single source of truth for this project.

@ferllings
Copy link
Author

Found some traces here: mislav/hub#435

@sigmavirus24
Copy link
Owner

Is this documented anywhere on https://developer.github.com/? If not, then file a bug with the API because that's the single source of truth for this project.

@ferllings
Copy link
Author

Thanks,

Where is the bug tracking for the API? I can't find it

@sigmavirus24
Copy link
Owner

From https://developer.github.com/v3/

This describes the resources that make up the official GitHub API v3. If you have any problems or requests please contact support.

@ferllings
Copy link
Author

Here is the answer:
"Yeah, that's expected behavior for now -- if your using Basic Auth to authenticate and are using 2FA with SMS, the API will send 2FA SMSes with OTPs only for API requests to create tokens. This allows you to use the Authorizations API to create an OAuth token. If you're using other APIs and have 2FA enabled, you should authenticate using an OAuth token (instead of with username+password) because using an OAuth token doesn't require you to enter an OTP when making API calls. "

@sigmavirus24
Copy link
Owner

@ferllings, since this is "expected behaviour" are you okay with me closing this?

@ferllings
Copy link
Author

Yes, I suppose

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

No branches or pull requests

2 participants