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

Not all types of errors should count against RefreshWindow count #3694

Open
1 task done
andreas-bakriemer opened this issue Mar 2, 2023 · 2 comments
Open
1 task done

Comments

@andreas-bakriemer
Copy link

Problem

Whenever an access token refresh request/operation fails, it counts in the RefreshWindow. Using a RefreshWindow will eventually cause excessiveRefresh errors to be thrown. If the errors refreshing the access token are related to network problems (as it will come to pass on a mobile platform), the RefreshWindow can fill up rather quickly. I like the idea of excessiveRefresh errors, but only when it's related to actual errors concerning authentication - not timeouts and reachability.

Feature Request

It could be nice to be able to configure what types of errors count in the refresh window. A suitable default would obviously be all errors, so that not-configured RefreshWindows continue to operate as they do already.

@SamHastings1066
Copy link

Hi there,

I’ve begun resolving this issue and have developed a feature that allows users to configure which types of errors count towards the refresh window. The default behavior remains unchanged, counting all errors, while users can now provide a closure to specify their error handling logic.

I'm in the process of writing tests and updating the documentation to reflect this new feature. I plan to submit a draft PR soon to get feedback on the implementation.

Could this issue be assigned to me to avoid duplicate work?

Thank you!

@jshier
Copy link
Contributor

jshier commented Feb 15, 2024

Issue assignments aren't used like that, and there's no one else working on the issue, so feel to work as you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants