Skip to content

Commit c9f0720

Browse files
authored
fix(experience): fix Google social direct sign in bug (#7797)
1 parent 1ef18ba commit c9f0720

File tree

1 file changed

+7
-7
lines changed
  • packages/experience/src/pages/DirectSignIn

1 file changed

+7
-7
lines changed

packages/experience/src/pages/DirectSignIn/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ const DirectSignIn = () => {
2424
if (method === 'social') {
2525
const social = socialConnectors.find((connector) => connector.target === target);
2626

27-
if (social && social.target === GoogleConnector.target && logtoGoogleOneTapCookie) {
28-
// eslint-disable-next-line @silverhand/fp/no-mutation
29-
window.location.href = `${window.location.origin}/callback/${experienceSettings?.googleOneTap?.connectorId}`;
30-
return;
31-
}
27+
if (social) {
28+
// Redirect to the Google One Tap callback page if the social connector is Google and the logtoGoogleOneTapCookie is present (external Google One Tap).
29+
if (social.target === GoogleConnector.target && logtoGoogleOneTapCookie) {
30+
// eslint-disable-next-line @silverhand/fp/no-mutation
31+
window.location.href = `${window.location.origin}/callback/${experienceSettings?.googleOneTap?.connectorId}`;
32+
return;
33+
}
3234

33-
// Continue with non-Google logic immediately
34-
if (social && social.target !== GoogleConnector.target) {
3535
void invokeSocialSignIn(social);
3636
return;
3737
}

0 commit comments

Comments
 (0)