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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add two-factor authentication support #5
Conversation
That's really really nice! 馃憤 However the thing you removed atom feeds request worries me a little. That's what I wanted: not compute manually all these messages. Are you sure that Atom feeds only support Basic auth? Please create |
Unfortunately, to get all of the info possible, yeah. https://developer.github.com/v3/activity/feeds/ Specifically:
So it would be possible to get the non-private feed without any auth, but this won't show anything from private repos, which would make the stream less useful. I'm not a fan of having the messages manually generated either, but it's the best solution I could think of. Also, added the contributors field! |
I have just tested it. Really nice improvement. 馃憤 |
Add two-factor authentication support
|
Oh, that's sweet! I wish I had saw that before, haha. I can implement that if you want, unless you want to take it. |
@remixz If you like, you can do it. I'm a little bit busy right now. If not, I will probably do it this week. 馃槃 |
Sorry for my delayed response here, been busy with school! Anyway, I took a look at the |
NP, I will try to do it, maybe today. 馃槃 |
Fixes #4.
This was a bit more work than I expected! 馃槅 To support 2FA without having to enter the 2FA auth code every time, I had to refactor the login from using Basic auth to token-based auth (also needed for the stream view... more on that in a sec). Overall, I think this is better though, since storing someone's password in plaintext isn't too safe.
I had to refactor the stream view to use an API route, since the Atom feeds only support Basic auth, which doesn't work with 2FA nicely. The API route (
/users/:user/received_events
) doesn't include the user-friendly text description, so I had to manually construct it. This does remove one dependency onxml2js
though!I did my best to follow your code style. Let me know what you think!