GithubPages access token to authorize octokit requests

42 Views Asked by At

As the title says, I'm wondering if it's possible to somehow grab a github PAT in a secured github pages app (private repo), which I could then use to authenticate octokit requests.

Example use-case:

  • Given: static web-application with no dedicated backend, hosted via github pages.

  • Goal: Create PR's on a repo without hardcoding the PAT in the websites static files.

Possible solutions:

  1. Pass octokit credentials / github-pat via url params to your frontend and grab it there, so you don't have to store it anywhere. Sounds pretty inconvenient though

  2. ..?

0

There are 0 best solutions below