-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for upto 8s for IDP sign in to finish, after popup is closed. (#…
…7140) * Wait for upto 8s for IDP sign in to finish, after popup is closed. 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. * Add changeset.
- Loading branch information
Showing
3 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@firebase/auth': patch | ||
--- | ||
|
||
Increase the popup poller timeout to 8s to support blocking functions + Firefox |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,7 +192,7 @@ browserDescribe('Popup IdP tests', driver => { | |
await widget.fillEmail('[email protected]'); | ||
await widget.clickSignIn(); | ||
|
||
// On redirect, check that the signed in user is different | ||
// On return to main window, check that the signed in user is different | ||
await driver.selectMainWindow(); | ||
const curUser = await driver.getUserSnapshot(); | ||
expect(curUser.uid).not.to.eq(anonUser.uid); | ||
|
@@ -210,7 +210,7 @@ browserDescribe('Popup IdP tests', driver => { | |
await widget.fillEmail('[email protected]'); | ||
await widget.clickSignIn(); | ||
|
||
// On redirect, check that the signed in user is upgraded | ||
// On return to main window, check that the signed in user is upgraded | ||
await driver.selectMainWindow(); | ||
const curUser = await driver.getUserSnapshot(); | ||
expect(curUser.uid).to.eq(anonUser.uid); | ||
|
@@ -396,6 +396,7 @@ browserDescribe('Popup IdP tests', driver => { | |
user = await driver.getUserSnapshot(); | ||
expect(user.uid).to.eq(user1.uid); | ||
expect(user.email).to.eq(user1.email); | ||
}).timeout(12_000); // Test takes a while due to the closed-by-user errors | ||
}).timeout(25_000); // Test takes a while due to the closed-by-user errors. Each closed-by-user | ||
// takes 8s to timeout, and we have 2 instances. | ||
}); | ||
}); |