Skip to content

Reduce polling to /user/refresh#2835

Merged
chrisknoll merged 7 commits intomasterfrom
issue-2820
Aug 15, 2023
Merged

Reduce polling to /user/refresh#2835
chrisknoll merged 7 commits intomasterfrom
issue-2820

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.

@chrisknoll chrisknoll requested a review from anthonysena August 11, 2023 14:13
anthonysena
anthonysena previously approved these changes Aug 14, 2023
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