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

Reduce polling to /user/refresh #2835

Merged
merged 7 commits into from Aug 15, 2023
Merged

Reduce polling to /user/refresh #2835

merged 7 commits into from Aug 15, 2023

Conversation

chrisknoll
Copy link
Collaborator

Add refreshTokenThreshold to limit polling for permissions in Route.js.
Alter polling intervals to use app config settings.

Fixes #2820.

Alter polling intervals to use app config settings.

Fixes #2820.
@chrisknoll
Copy link
Collaborator Author

I've updated this PR to create a common executeWithRefresh() method in AuthAPI that will prevent a lot of boilerplate code that I was copying to call the HTTP request and then follow with refreshToken().

Some elements look awkward, but it's because a single function (in most cases: save()) had 2 different paths: in the case it is a create-type of save, it would do a POST + refresh token. In the case of a update-type of save, it would only do a PUT. And then on top of that, there might be additional promise-chain type of activity, that was just too complciated to try to share between each path...so you might see duplicate code, but it's too complicated to share.

@anton-abushkevich : if you could run this branch on your environment and let me know if you see any issues. I would like to include this in 2.14.

anthonysena
anthonysena previously approved these changes Aug 14, 2023
@chrisknoll chrisknoll merged commit fccb8dc into master Aug 15, 2023
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the issue-2820 branch August 15, 2023 13:17
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

Successfully merging this pull request may close these issues.

UI Laggs when retrieving results from /refresh
3 participants