fix(connect-ui): do not detect closed auth-window#3755
Merged
hassan254-prog merged 3 commits intomasterfrom Mar 25, 2025
Merged
Conversation
Contributor
|
You'll need to change doc and ts comments, its said to be true by default |
TBonnin
approved these changes
Mar 25, 2025
…i-form-doesnt-close
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the problem and your solution
At times, the
modal.windowproperty is null making alsoclosedflag of the modal to always be true for some providers i.e calendly, zendesk, this in turn makes it hard to detect closed auth window.This can then cause double connection creation, since the
detectClosedAuthWindowwill always be true causing the user to "Try Again". This flag only works if the user has a pre-existing session with the provider and the 500ms delay doesn'tdetectClosedAuthWindow. But if the user is redirected to the login page, due to a non pre-existing session, the delay elapses, the error is thrown and once the user finishes signing in, the "Try Again" button is displayed and when they do so since they already have a session created, another connection will automatically be created.To avoid this, we can just have the user close the nango connect modal if they decide to also close the provider modal for now.