-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: keeps expiresAt
with token
if present
#50
Conversation
50fba9f
to
6ff532b
Compare
6ff532b
to
cc837e8
Compare
src/types.ts
Outdated
expiresAt?: string; | ||
}; | ||
|
||
export type GitHubAppAuthenticationWithExpiration = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should rename the GitHubAppAuthenticationWithExpiration
type to GitHubAppAuthenticationWithRefreshToken
in order to make the distinction clear now that we added expiresAt?
to GitHubAppAuthentication
?
We should however keep the GitHubAppAuthenticationWithExpiration
type because other @octokit/
packages now dependon it, but we could mark it as @deprecated
, until the next breaking version.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I @deprecated
both GitHubAppAuthentication
and GitHubAppAuthenticationWithExpiration
(with their original definition untouched) and introduced:
GitHubAppAuthenticationWithExpirationEnabled
GitHubAppAuthenticationWithExpirationDisabled
GitHubAppAuthenticationWithRefreshToken
Once the types defined in different modules are crystallize, can we try to refactor (and unify) them into octokit/types
? I’m not familiar with the existing design so I’m not very confident that the PR is consistent with the big picture.
Please let me know if it doesn’t look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, thanks a lot!
We do a big revamp of how the types work at https://github.com/octokit/octokit-next.js, I'll make sure to adapt the new naming there once we get to it.
We can update the types at other projects that import them but it's not critical.
cc837e8
to
d5b9c5f
Compare
d5b9c5f
to
9a02052
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
🎉 This PR is included in version 1.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When token expiration applies, return values with a
token
should comes with anexpiresAt
.Documentation of below GitHub APIs indicates an
expires_at
property may show up in the response data: