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

Avoid Multiple Notifications on Expired Session #4645

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

djhi
Copy link
Contributor

@djhi djhi commented Apr 6, 2020

No description provided.

@djhi djhi added the RFR Ready For Review label Apr 6, 2020
@djhi djhi added this to the 3.4.1 milestone Apr 6, 2020
@Kmaschta Kmaschta merged commit 6ef44eb into master Apr 7, 2020
@Kmaschta Kmaschta deleted the avoid-multiple-notifications-on-expired-auth branch April 7, 2020 07:51
// To avoid having multiple notifications, we first verify if
// a checkError promise is already ongoing
if (!authCheckPromise) {
authCheckPromise = authProvider
Copy link
Member

Choose a reason for hiding this comment

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

why do you store the entire Promise instead of just a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this way, anyone interested by its result will receive it ?

Copy link
Member

Choose a reason for hiding this comment

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

Hm, you're exposing a private API publicly without a real use case... I'm not comfortable with 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.

We were returning it before already. Nothing has changed. We just don't allow multiple simultaneous calls, that's all

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, thanks for the explanation.

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

Successfully merging this pull request may close these issues.

3 participants