API Reference
    Preparing search index...

    Variable VerifyAuthChallengeTriggerSchemaConst

    VerifyAuthChallengeTriggerSchema: ZodObject<
        extendShape<
            {
                callerContext: ZodObject<
                    { awsSdkVersion: ZodString; clientId: ZodString },
                    "strip",
                    ZodTypeAny,
                    { awsSdkVersion: string; clientId: string },
                    { awsSdkVersion: string; clientId: string },
                >;
                region: ZodString;
                request: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
                response: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
                triggerSource: ZodString;
                userName: ZodOptional<ZodString>;
                userPoolId: ZodString;
                version: ZodString;
            },
            {
                request: ZodObject<
                    {
                        challengeAnswer: ZodString;
                        clientMetadata: ZodOptional<ZodRecord<ZodString, ZodString>>;
                        privateChallengeParameters: ZodRecord<ZodString, ZodString>;
                        userAttributes: ZodRecord<ZodString, ZodString>;
                        userNotFound: ZodOptional<ZodBoolean>;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        challengeAnswer: string;
                        clientMetadata?: Record<string, string>;
                        privateChallengeParameters: Record<string, string>;
                        userAttributes: Record<string, string>;
                        userNotFound?: boolean;
                    },
                    {
                        challengeAnswer: string;
                        clientMetadata?: Record<string, string>;
                        privateChallengeParameters: Record<string, string>;
                        userAttributes: Record<string, string>;
                        userNotFound?: boolean;
                    },
                >;
                response: ZodObject<
                    { answerCorrect: ZodBoolean },
                    "strip",
                    ZodTypeAny,
                    { answerCorrect: boolean },
                    { answerCorrect: boolean },
                >;
                triggerSource: ZodLiteral<"VerifyAuthChallengeResponse_Authentication">;
            },
        >,
        "strip",
        ZodTypeAny,
        {
            callerContext: { awsSdkVersion: string; clientId: string };
            region: string;
            request: {
                challengeAnswer: string;
                clientMetadata?: Record<string, string>;
                privateChallengeParameters: Record<string, string>;
                userAttributes: Record<string, string>;
                userNotFound?: boolean;
            };
            response: { answerCorrect: boolean };
            triggerSource: "VerifyAuthChallengeResponse_Authentication";
            userName?: string;
            userPoolId: string;
            version: string;
        },
        {
            callerContext: { awsSdkVersion: string; clientId: string };
            region: string;
            request: {
                challengeAnswer: string;
                clientMetadata?: Record<string, string>;
                privateChallengeParameters: Record<string, string>;
                userAttributes: Record<string, string>;
                userNotFound?: boolean;
            };
            response: { answerCorrect: boolean };
            triggerSource: "VerifyAuthChallengeResponse_Authentication";
            userName?: string;
            userPoolId: string;
            version: string;
        },
    > = ...

    A zod schema for a Cognito Verify Auth Challenge Response trigger event.

    {
    "version": "1",
    "triggerSource": "VerifyAuthChallengeResponse_Authentication",
    "region": "us-east-1",
    "userPoolId": "us-east-1_ABC123",
    "userName": "johndoe",
    "callerContext": {
    "awsSdkVersion": "2.814.0",
    "clientId": "client123"
    },
    "request": {
    "userAttributes": { "email": "user@example.com", "name": "John Doe" },
    "privateChallengeParameters": { "answer": "expectedAnswer" },
    "challengeAnswer": "userAnswer",
    "clientMetadata": { "key": "value" },
    "userNotFound": false
    },
    "response": {
    "answerCorrect": true
    }
    }