放大发送CustomChallengeAnswer不存在

问题描述 投票:0回答:1
Property 'sendCustomChallengeAnswer' does not exist on type 'typeof import("{file_path}/@aws-amplify/auth/dist/esm/index")

尽管导入,错误代码仍出现在上面

import { Amplify } from "aws-amplify";
import Auth from '@aws-amplify/auth'
import awsconfig from '@/aws-exports';
Amplify.configure(awsconfig);

下面是我如何实现 sendCustomChallengeAnswer

        verifyOtp: () => {
          Auth.sendCustomChallengeAnswer(session, otp)
          .then((user) => {
            setUser(user);
            setMessage(SIGNEDIN);
            // setSession(null);
          })
          .catch((err) => {
            setMessage(err.message);
            setOtp('');
            console.log(err);
          });
        },
aws-amplify
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.