Before we can begin, we’ll need to create an application on GitHub in order to get a client ID and client secret.
On GitHub.com, from the “Settings” page, click on the “Developer Settings” link in the sidebar. You will end up on
Fill out the required information, including the callback URL. If you are developing an application locally, you’ll have to use a local address for the callback URL. Since GitHub allows only one registered callback URL per application, it is useful to create two applications, one for development, and a separate one for production.
After completing this form, you’ll be taken to a page where you can see the client ID and secret issued to your application, shown below.