benweet / stackedit

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

[Workspace/OAuth][GitHub]: Client 400s when trying to authenticate with GitHub as Workspace provider #1795

Closed kevinnls closed 2 years ago

kevinnls commented 2 years ago

\@\flokno I think this is another issue. Can you open another ticket and add the HTTP response you get from your GitLab according to the network tab of your browser ?

Originally posted by @benweet in https://github.com/benweet/stackedit/issues/1290#issuecomment-508432950

{
  "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"
}
kevinnls commented 2 years ago

additional reference: Creating scoped access tokens https://docs.github.com/en/rest/apps/oauth-applications#create-a-scoped-access-token

kevinnls commented 2 years ago

where the request is defined in source https://github.com/benweet/stackedit/blob/46383b5b6a54b65b8720d786ed0a0518b9ad652d/src/services/providers/helpers/githubHelper.js#L92

docs for the api https://docs.github.com/en/rest/users/users

ShawnPConroy commented 2 years ago

Hello. It looks like this was first noticed ahead of time and possibly fixed in #1724 and a pull request issued. However, @benweet is the maintainer of StackEdit and has been kinda MIA since 2019. He has not be active on the StackEdit community since Jan 2019. Has few commits over the last two year, but a few for this project one month in 2021. And he seems to maintain the website. So this project seems like it's dead. Which is a shame because it's the best online editor and I use it a lot, and it's a shame it's integrations are not working.

This problem has a workaround listed in #1755 you can use. I did this when adding my workspace, and when I close the site and open again it seems to still be working. People may need to re-authorize their account. Also note it defaults to the 'master' branch rather than 'main' branch wish is the new default branch, if you are creating a new work space on a new repository.

kevinnls commented 2 years ago

aw. thank you very much for taking the time ^_^