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

Wait for upto 8s for IDP sign in to finish, after popup is closed. #7140

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

prameshj
Copy link
Contributor

@prameshj prameshj commented Mar 20, 2023

In some cases (Fiefox or mobile or if opener is an iframe), the popup is closed by the oauth helper code right after sign in has completed at the IDP. The IDP response still needs to be processed by the SDK + signInWithIdp API call needs to be invoked. This can take upto 7s, if there is a blocking function configured. Increase the poller timeout to 8s, so it does not reject the sign in with popup-closed-by-user error.

Fixes - #7049, #7093
@sam-gc @renkelvin

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2023

🦋 Changeset detected

Latest commit: 4efa91a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/auth Patch
@firebase/auth-compat Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@renkelvin renkelvin left a comment

Choose a reason for hiding this comment

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

You may want to change the title of this PR to 8s.

@prameshj prameshj changed the title Wait for upto 5s for IDP sign in to finish, after popup is closed. Mar 20, 2023
@prameshj prameshj force-pushed the popup-timeout branch 4 times, most recently from 62d1ae2 to 279b746 Compare March 28, 2023 20:53
@prameshj
Copy link
Contributor Author

This is probably causing a real failure in the CI. will investigate and target the next release.

@prameshj prameshj force-pushed the popup-timeout branch 3 times, most recently from d486d34 to 0241ba4 Compare April 8, 2023 06:09
@prameshj prameshj force-pushed the popup-timeout branch 3 times, most recently from 37bf4ae to 59d2c86 Compare April 14, 2023 17:23
In some cases (Fiefox or mobile or if opener is an iframe), the popup is closed by the oauth helper code
right after sign in has completed at the IDP. The IDP response still needs to be processed by the SDK + signInWithIdp API
call needs to be invoked. This can take upto 7s, if there is a blocking function configured. Increase the poller timeout
to 8s, so it does not reject the sign in with popup-closed-by-user error.

increase timeout for the aborted sign in test.
@prameshj prameshj merged commit 1d6771e into master Apr 14, 2023
@prameshj prameshj deleted the popup-timeout branch April 14, 2023 23:45
@google-oss-bot google-oss-bot mentioned this pull request Apr 25, 2023
@firebase firebase locked and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
4 participants