diff --git a/.changeset/two-worms-yawn.md b/.changeset/two-worms-yawn.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/two-worms-yawn.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/src/ui/components/GoogleOneTap/one-tap-start.tsx b/packages/clerk-js/src/ui/components/GoogleOneTap/one-tap-start.tsx index a15ab8da6ca..591e2e65bc1 100644 --- a/packages/clerk-js/src/ui/components/GoogleOneTap/one-tap-start.tsx +++ b/packages/clerk-js/src/ui/components/GoogleOneTap/one-tap-start.tsx @@ -65,6 +65,7 @@ function _OneTapStart(): JSX.Element | null { }, }); + // Trigger only on mount/unmount. Above we handle the logic for the initial fetch + initialization useEffect(() => { if (google && !user?.id) { google.accounts.id.prompt(); @@ -74,7 +75,7 @@ function _OneTapStart(): JSX.Element | null { google.accounts.id.cancel(); } }; - }, [google, user?.id]); + }, [user?.id]); return null; }