Skip to content

Commit 19935a5

Browse files
committed
Fix compat test
1 parent f216807 commit 19935a5

File tree

1 file changed

+8
-2
lines changed
  • packages/auth-compat/test/integration/webdriver/static

1 file changed

+8
-2
lines changed

packages/auth-compat/test/integration/webdriver/static/redirect.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ export function idpLinkRedirect() {
3939
.currentUser.linkWithRedirect(new compat.auth.GoogleAuthProvider());
4040
}
4141

42-
export function redirectResult() {
43-
return compat.auth().getRedirectResult();
42+
export async function redirectResult() {
43+
const result = await compat.auth().getRedirectResult();
44+
if (result.user === null && result.credential === null) {
45+
// In the new SDK (and consequently the tests), null is returned instead of
46+
// a credential with a null user/cred
47+
return null;
48+
}
49+
return result;
4450
}
4551

4652
export async function generateCredentialFromRedirectResultAndStore() {

0 commit comments

Comments
 (0)