From faa48aa0425c78b7a8f5e47d60fb2ed8978b6e3c Mon Sep 17 00:00:00 2001 From: simeng-li Date: Mon, 5 Aug 2024 10:23:32 +0800 Subject: [PATCH] fix(experience): fix google one tap fix google one tap --- .../use-social-sign-in-listener.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/experience/src/pages/SocialSignInWebCallback/use-social-sign-in-listener.ts b/packages/experience/src/pages/SocialSignInWebCallback/use-social-sign-in-listener.ts index 197875bce..d1eba1510 100644 --- a/packages/experience/src/pages/SocialSignInWebCallback/use-social-sign-in-listener.ts +++ b/packages/experience/src/pages/SocialSignInWebCallback/use-social-sign-in-listener.ts @@ -13,8 +13,11 @@ import { useNavigate, useSearchParams } from 'react-router-dom'; import { validate } from 'superstruct'; import UserInteractionContext from '@/Providers/UserInteractionContextProvider/UserInteractionContext'; -import { identifyAndSubmitInteraction, verifySocialVerification } from '@/apis/experience'; -import { putInteraction } from '@/apis/interaction'; +import { + identifyAndSubmitInteraction, + initInteraction, + verifySocialVerification, +} from '@/apis/experience'; import useBindSocialRelatedUser from '@/containers/SocialLinkAccount/use-social-link-related-user'; import useApi from '@/hooks/use-api'; import type { ErrorHandlers } from '@/hooks/use-error-handler'; @@ -49,7 +52,7 @@ const useSocialSignInListener = (connectorId: string) => { const registerWithSocial = useSocialRegister(connectorId, true); const verifySocial = useApi(verifySocialVerification); const asyncSignInWithSocial = useApi(identifyAndSubmitInteraction); - const asyncPutInteraction = useApi(putInteraction); + const asyncPutInteraction = useApi(initInteraction); const accountNotExistErrorHandler = useCallback( async (error: RequestErrorBody) => {