Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Make it easier to use github app installation tokens #1716

Open
1 task done
stiak opened this issue Oct 8, 2024 · 3 comments
Open
1 task done

[FEAT]: Make it easier to use github app installation tokens #1716

stiak opened this issue Oct 8, 2024 · 3 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@stiak
Copy link

stiak commented Oct 8, 2024

Describe the need

I wanted to perform actions on github repo's as the application - not an individual user who might leave the organisation.

I was trying to use a client_id and client_secret for this, but not succeeding.

I ended up following the instructions here.

This works, but:

  • It's not explained well in the Readme.
  • Involved me copy+pasting the private key => JWT generation code.

Ideally the client signature would instead be something like:

Octokit::Client.new(app_id: <my 20 character app id>, private_key: <key contents>, installation_id: <ID>)

The SDK would handle the juggling that happens behind the scenes. This seems similar to how the JS client works.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stiak stiak added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Oct 8, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Oct 11, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Oct 11, 2024
@pbstriker38
Copy link
Contributor

Would you also expect it to refresh the access token for you when it expires since you will no longer be in control of that flow?

@stiak
Copy link
Author

stiak commented Oct 21, 2024

That'd be ideal - that also seems to be how the JS SDK works:

Additionally, the SDK will take care of regenerating an installation access token for you so you don't need to worry about the one hour expiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

3 participants