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

RefreshAuth type #222

Open
schlichtanders opened this issue Apr 22, 2024 · 0 comments
Open

RefreshAuth type #222

schlichtanders opened this issue Apr 22, 2024 · 0 comments

Comments

@schlichtanders
Copy link

Hi there, I was using a RefreshAuth type for github which I build myself by patching GitHub.jl. It does the following:

  • behaves like a normal auth until an error is thrown
  • if this error is an authentication error, it tries to refresh the authentication token with the additionally given refresh token and tries again
  • if it still errors, the error is thrown as usual

This is very handy when dealing with short lived tokens.

Since Julia 1.10 it is unfortunately no longer possible to patch other packages that easily, and hence there is currently no way to implement this on top of GitHub, as one need changes to github_request.

It would be great if some logic like this could become part of GitHub.jl

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

No branches or pull requests

1 participant