API Reference
    Preparing search index...

    Variable DefineAuthChallengeTriggerSchemaConst

    DefineAuthChallengeTriggerSchema: ZodObject<
        {
            callerContext: ZodObject<
                { awsSdkVersion: ZodString; clientId: ZodString },
                $strip,
            >;
            region: ZodString;
            request: ZodObject<
                {
                    clientMetadata: ZodOptional<ZodRecord<ZodString, ZodString>>;
                    session: ZodArray<
                        ZodObject<
                            {
                                challengeMetadata: ZodOptional<ZodString>;
                                challengeName: ZodUnion<
                                    readonly [
                                        ZodLiteral<"CUSTOM_CHALLENGE">,
                                        ZodLiteral<"SRP_A">,
                                        ZodLiteral<"PASSWORD_VERIFIER">,
                                        ZodLiteral<"SMS_MFA">,
                                        ZodLiteral<"EMAIL_OTP">,
                                        ZodLiteral<"SOFTWARE_TOKEN_MFA">,
                                        ZodLiteral<"DEVICE_SRP_AUTH">,
                                        ZodLiteral<"DEVICE_PASSWORD_VERIFIER">,
                                        ZodLiteral<"ADMIN_NO_SRP_AUTH">,
                                    ],
                                >;
                                challengeResult: ZodBoolean;
                            },
                            $strip,
                        >,
                    >;
                    userAttributes: ZodRecord<ZodString, ZodString>;
                    userNotFound: ZodOptional<ZodBoolean>;
                },
                $strip,
            >;
            response: ZodObject<
                {
                    challengeName: ZodOptional<ZodNullable<ZodString>>;
                    failAuthentication: ZodOptional<ZodNullable<ZodBoolean>>;
                    issueTokens: ZodOptional<ZodNullable<ZodBoolean>>;
                },
                $strip,
            >;
            triggerSource: ZodLiteral<"DefineAuthChallenge_Authentication">;
            userName: ZodOptional<ZodString>;
            userPoolId: ZodString;
            version: ZodString;
        },
        $strip,
    > = ...

    A zod schema for a Cognito Define Auth Challenge trigger event.

    {
    "version": "1",
    "triggerSource": "DefineAuthChallenge_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" },
    "session": [
    {
    "challengeName": "SRP_A",
    "challengeResult": true,
    "challengeMetadata": "metadata"
    }
    ],
    "clientMetadata": { "key": "value" },
    "userNotFound": false
    },
    "response": {
    "challengeName": "PASSWORD_VERIFIER",
    "issueTokens": false,
    "failAuthentication": false
    }
    }