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

CS-4064: Refresh Token in IDM enabled Instance does not live more tha… #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

odukhnytskyi-sugarcrm
Copy link
Contributor

…n 24 hours

src/client.js Outdated
// prevents concurrent events from multiple tabs asking for a
// refresh token
if (_refreshingToken) {
return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please describe how it works?
Value of a variable is not sharing between browser tabs, so _refreshingToken is always undefined here, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. We don't use crosstab functionality correctly here. We send refresh token simultaneously for different tabs in this place. For regular behaviour, we consider refresh token process could already be run and doesn't allow sending request from different tab. here: https://github.com/sugarcrm/ventana/blob/master/src/client.js#L2146
But in case _handleErrorAndRefreshToken method is called we don't provide the same logic

src/client.js Outdated Show resolved Hide resolved
@odukhnytskyi-sugarcrm odukhnytskyi-sugarcrm force-pushed the CS-4064 branch 7 times, most recently from 884a45e to d388c07 Compare October 30, 2024 10:00
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.

2 participants