access token passed in url problem
john012343210 opened this issue · comments
login-with-github/server/index.js
Line 41 in cb39c5e
Deprecation Notice: GitHub will discontinue authentication to the API using query parameters. Authenticating to the API should be done with HTTP basic authentication. Using query parameters to authenticate to the API will no longer work on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
Probably because of security issue, passing access token in the url is no longer supported by github,
please kindly put the access token in the authorization header
since there is no point in passing the scope and token_type (useless parameter)
An example that is working could be like (tested successfully in my computer)
return fetch(
`https://api.github.com/user`,{
headers: {
Authorization: `token ${access_token}`
}
}
);
@AronWater thanks for the info. I've fixed it and pushed new changes.