From the course: Building Your First CLI App in Node

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Authenticate with GitHub

Authenticate with GitHub

From the course: Building Your First CLI App in Node

Start my 1-month free trial

Authenticate with GitHub

- [Instructor] For the purposes of this project, it's probably the most simple to deactivate two-factor authentication on your GitHub account if you have two-factor authentication currently enabled. Now that we're connected to the GitHub API, and have some core functions skeleton-outlined, let's build out the rest of the functionality to authenticate our users using the GitHub API Octokit. Some of our GitHub methods are already set up in our inquirer file. So let's be sure to require inquirer at the top of our GitHub credentials file. Then, we're going to work inside of our setGitHubCredentials function near the bottom here. Inside of our setGitHubCredentials, we're going to create a const called credentials. This is going to store the information retrieved from the askGitHubCredentials prompts we set up in our inquirer file. So here, we're going to await inquirer and it's askGitHubCredentials. When we're using the command await here, this is an operator used to wait for a promise and…

Contents