Skip to content

Comments

fix(connect-ui): do not detect closed auth-window#3755

Merged
hassan254-prog merged 3 commits intomasterfrom
wari/kelvinwari/ext-574-calendly-connect-ui-form-doesnt-close
Mar 25, 2025
Merged

fix(connect-ui): do not detect closed auth-window#3755
hassan254-prog merged 3 commits intomasterfrom
wari/kelvinwari/ext-574-calendly-connect-ui-form-doesnt-close

Conversation

@hassan254-prog
Copy link
Contributor

@hassan254-prog hassan254-prog commented Mar 21, 2025

Describe the problem and your solution

  • At times, the modal.window property is null making also closed flag 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 detectClosedAuthWindow will 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't detectClosedAuthWindow. 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.

@linear
Copy link

linear bot commented Mar 21, 2025

@hassan254-prog hassan254-prog self-assigned this Mar 21, 2025
@hassan254-prog hassan254-prog requested a review from a team March 21, 2025 12:56
@bodinsamuel
Copy link
Contributor

You'll need to change doc and ts comments, its said to be true by default

@hassan254-prog hassan254-prog enabled auto-merge (squash) March 25, 2025 12:53
@hassan254-prog hassan254-prog merged commit db29a46 into master Mar 25, 2025
15 checks passed
@hassan254-prog hassan254-prog deleted the wari/kelvinwari/ext-574-calendly-connect-ui-form-doesnt-close branch March 25, 2025 12:58
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.

3 participants