benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.49k stars 2.7k forks source link

Deprecating API authentication Github #1766

Closed tdnhduc closed 2 years ago

tdnhduc commented 2 years ago

When I'm trying access private repository on stackedit.io.

curl 'https://api.github.com/user?access_token=<MY_ACCESS_TOKEN>' \
  -H 'authority: api.github.com' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36' \
  -H 'accept: */*' \
  -H 'sec-gpc: 1' \
  -H 'origin: https://stackedit.io' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://stackedit.io/' \
  -H 'accept-language: en-US,en;q=0.9' \
  --compressed

stackedit.io receive response from github

  "message": "Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param",
  "documentation_url": "https://docs.github.com/v3/#oauth2-token-sent-in-a-header"
}

Please update this api. Refer https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

tyoc213 commented 2 years ago

https://github.com/benweet/stackedit/issues/1755#issuecomment-918949789