Skip to content

fix: don't hold on to raw auth tokens #145

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

Merged
merged 1 commit into from
May 14, 2025
Merged

Conversation

dsanders11
Copy link
Member

The current implementation is getting an installation auth token and then holding on to it indefinitely, which is a problem because those expire after 60 minutes. Refactor to use the proper approach to let Octokit fetch new tokens as needed.

@dsanders11 dsanders11 marked this pull request as ready for review May 13, 2025 23:21
@dsanders11 dsanders11 requested review from a team as code owners May 13, 2025 23:21
Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it and see 😄

Comment on lines +20 to +22
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think previously we were just passing in the token here, will this method take the entire object and still work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should! This is one of the forms shown in the docs: https://github.com/octokit/auth-app.js/?tab=readme-ov-file#usage-with-octokit

@dsanders11 dsanders11 merged commit 495aa73 into main May 14, 2025
1 check passed
@dsanders11 dsanders11 deleted the fix/no-raw-auth-tokens branch May 14, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants