GitHub uses OAuth2 authentication on it's API to restrict access to private routes and rate limit unauthorized access. Authentication with GitHub is already setup in this project, however, you will need to generate your own developer token and add it to a token.js file at the top level of the project in order to use the provided authentication method. The steps for this setup are below:
- Go to GitHub and select settings in the drop down from the upper-right hand side of the navigation bar.
- Navigate to
Developer settingsbetweenPersonal settingsandOrganization settingsin the left Navigation.
- Go to
Personal access tokens
- Click
Generate new tokenand if prompted for password use your GitHub account password to authorize token creation.
- In the token generation screen give the token any description you want and select
public_repounder thereposelection and all of theuseroptions.
- Generate the token and copy the newly generated token string.
- Create a file named
token.jsat the root of your dev-duel directory.
- In the newly created
token.jsfile paste the token string you created into the empty string and add 'token '.
In order to verify your token is properly setup, run the application with the command npm run serve and navigate to localhost:3000/api/rate. The "limit" on the "rate" object should be 5000.








