chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Allow authenticated GitHub users to get private data via GitHub API

Open humphd opened this issue 1 year ago • 0 comments

In order to use our /proxy CloudFlare endpoint via the /import command, a user has to be logged in via GitHub. When this happens, we store a GitHub Access Token in a secure cookie, and can then use it later to make authenticated calls to the GitHub REST API.

I did an experiment to day to try rewriting a request for a GitHub file blob URL into a call to the GitHub Contents API. Doing so would allow us to get access to private repos on behalf of a user.

However, this failed. I suspect that the issue is related to the scope of our OAuth app. @tarasglek I think you created this originally. If so, are you able to see what we have set for the scopes? If we can increase it, we'll be able to get at things like files, gists, issues, PRs, etc. via API calls.

humphd avatar Jan 31 '24 00:01 humphd