Previous: , Up: GitHub API Authentication   [Index]

1.1.4 GitHub API Authentication—Username and Password–Basic

Today, on February 14, 2020, GitHub announced its deprecation timeline for authenticating using a username and a password. Which means you have only time until November 13, 2020 to give this a try ðŸĪŠ.

I have mixed feelings about the deprecation. It makes me happy because Basic authentication has all kinds of security problems. Adding two-factor authentication made it a bit more secure, but also a pain in the 🍑.

I’m sad, because I created @octokit/auth-basic! to hide away most of the complexities introduced by two-factor authentication, and I think it turned out pretty nicely 😭 I think it’s a good example of what an API client library can do to hide away complexities from consumers of that API.

So, for the history books, let’s see how to use @octokit/auth-basic to authenticate using ‘username’, ‘password’, and two-factor authentication.