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

Fix user token refresh not working after token expired #223

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

alexhung
Copy link
Member

@alexhung alexhung commented Nov 6, 2024

Fixes #217

  • Upgrade to Go 1.22
  • Update GoReleaser config for deprecated key
  • Handle expired access token when reading user config and attempt to refresh the token
  • Split off code for refreshing token from create token.
  • Move code that determine whether to use new or old API to earlier when config is being created. The value is then stored in the config for later use.
  • Use token ID only when revoking token
  • More logging with func context

And attempt to refresh the token

Split off code for refreshing token from create token.

Move code that determine whether to use new or old API to earlier when config is being created. The value is then stored in the config for later use.

Use token ID only when revoking token

More logging with func context
@alexhung alexhung added the bug Something isn't working label Nov 6, 2024
@alexhung
Copy link
Member Author

alexhung commented Nov 6, 2024

@elestedt You may be interested in pulling this PR branch and give it a test run or two.

@elestedt
Copy link

elestedt commented Nov 8, 2024

I'd love to, but have not had time so far. Don't let waiting for me stop you from merging it though :)
I've had a quick look at the code and tests, they seem to cover the scenario we've run into

@alexhung alexhung marked this pull request as ready for review November 8, 2024 16:53
@alexhung alexhung requested a review from danielmkn November 8, 2024 16:54
@alexhung alexhung merged commit 7b4c087 into master Nov 8, 2024
2 checks passed
@alexhung alexhung deleted the GH-217-fix-user-token-refresh branch November 8, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user_token refresh issue
5 participants