0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(experience): fix google one tap

fix google one tap
This commit is contained in:
simeng-li 2024-08-05 10:23:32 +08:00
parent 17534fcd27
commit faa48aa042
No known key found for this signature in database
GPG key ID: 14EA7BB1541E8075

View file

@ -13,8 +13,11 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
import { validate } from 'superstruct'; import { validate } from 'superstruct';
import UserInteractionContext from '@/Providers/UserInteractionContextProvider/UserInteractionContext'; import UserInteractionContext from '@/Providers/UserInteractionContextProvider/UserInteractionContext';
import { identifyAndSubmitInteraction, verifySocialVerification } from '@/apis/experience'; import {
import { putInteraction } from '@/apis/interaction'; identifyAndSubmitInteraction,
initInteraction,
verifySocialVerification,
} from '@/apis/experience';
import useBindSocialRelatedUser from '@/containers/SocialLinkAccount/use-social-link-related-user'; import useBindSocialRelatedUser from '@/containers/SocialLinkAccount/use-social-link-related-user';
import useApi from '@/hooks/use-api'; import useApi from '@/hooks/use-api';
import type { ErrorHandlers } from '@/hooks/use-error-handler'; import type { ErrorHandlers } from '@/hooks/use-error-handler';
@ -49,7 +52,7 @@ const useSocialSignInListener = (connectorId: string) => {
const registerWithSocial = useSocialRegister(connectorId, true); const registerWithSocial = useSocialRegister(connectorId, true);
const verifySocial = useApi(verifySocialVerification); const verifySocial = useApi(verifySocialVerification);
const asyncSignInWithSocial = useApi(identifyAndSubmitInteraction); const asyncSignInWithSocial = useApi(identifyAndSubmitInteraction);
const asyncPutInteraction = useApi(putInteraction); const asyncPutInteraction = useApi(initInteraction);
const accountNotExistErrorHandler = useCallback( const accountNotExistErrorHandler = useCallback(
async (error: RequestErrorBody) => { async (error: RequestErrorBody) => {