- Notifications
You must be signed in to change notification settings - Fork2.5k
fix(generic): check local token expiry#1837
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
becm commentedFeb 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'd very much like to haveany approach towards identifying local token expiration.
The last approach changing the API for the storage format (#1464) is now stale for almost a year. The |
becm commentedFeb 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Some major caveat found while trying to prototype a "username@expiration" approach: Some storage back ends may also be thrown off by the changing username… Relative time in protocol additionally indicates this is to be used as a transient element. For now I'd definitely favor using structured token detection (transparent, backward-compatible, non-intrusive). |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
e7d3dc2 tod7e4f76Comparelostmsu commentedJun 26, 2025
@mjcheetham@mpysson can you please take a look at this change? It's already been iterated upon. |
lostmsu commentedJun 26, 2025
@mjcheetham@mpysson there've been no changes in this project for 5 months. Can I co-maintain it? Not sure if I can do it long term but I promise to go through the currently open pull requests at the very least. Better than nothing. |
itsjustnickdev commentedSep 25, 2025
any updates on this push? |
dscho commentedSep 30, 2025
@itsjustnickdev cautiously: yes. I opened#2059. However, during the extended time of ownership limbo, Git Credential Manager's release process has withered to the point where no releases can be made as of time of writing (notarizing, for example, is broken, yet it is required for Git Credential Manager to work on macOS). Therefore, the primary concern right now is to get that release process into a healthy shape. If you want to look into#2059 in the meantime, that would be really cool, of course! |
mjcheetham left a comment
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.
What do you think about the merits of using theJsonWebToken type from thehttps://www.nuget.org/packages/Microsoft.IdentityModel.JsonWebTokens package?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
add decode support to Base64Url converteroverride GenericHostProvider credential query to check for token expiryadd expiry check for refresh tokenadd generic StructuredToken class with expiry status propertyadd minimal JWT data classes for content decoding and extraction
becm commentedNov 14, 2025
@mjcheetham replaced handling of JWT with ageneric StructuredToken placeholder. This should make expanding support (or replace implementation) fairly easily later on. |
Uh oh!
There was an error while loading.Please reload this page.
Not checking for expired tokens triggers failures on first fetch/push after expiration.
Many Oauth2 implementations use JWT, where expiration time stamp is stored in structured data.
Fixes#268
Fixes#1408
Fixes#1784