madlabsinc/teachcode

teachcode fetchtask <key> doesn't create a new task

Closed this issue · 1 comments

https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

As shown above, the API authentication through query parameters have deprecated, the workaround for the same is given in the above link itself.

To Reproduce


**Expected behavior**
Personal access token won't be authenticated and is deprecated.



**Environment Information**
MacOS High Sierra


Thanks for reporting.

This would do it:-

const API_URL = `https://api.github.com/user/repos?access_token=${userToken}`;

  const API_URL = `https://api.github.com/user/repos`;
  axios.defaults.headers.common['Authorization'] = `token ${userToken}`;

Feel free to shoot a PR.