0

I've created a GitHub application and have the application's client-secret and client-id.

I'd like to be able to use this new application to simply authenticate to GitHub.

In order to do so, I need to use my application's client_id and client_secret to generate a JWT token which will then allow me to perform the following command:

curl --request GET \
--url "https://api.github.com/app" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer YOUR_JWT" \
--header "X-GitHub-Api-Version: 2022-11-28"

Problem is, I can't find any documentation on how to generate this JWT token using the application properties I'm given (the client_id and client_secret). I've seen this doc on the GitHub docs page, but it simply shows how to use a JTW token, and not how to generate it.

How can I use a GitHub application's client_id and client_secret to create a JWT for authentication?

Vismark Juarez
  • 613
  • 4
  • 14
  • 21

0 Answers0