Menu
Amazon Cognito
Developer Guide

Verify Auth Challenge Lambda Parameters

Amazon Cognito invokes this trigger to verify if the response from the end user for a custom Auth Challenge is valid or not.

The request for this trigger contains the privateChallengeParameters and challengeAnswer parameters. The privateChallengeParameters values are returned by the Create Auth Challenge Lambda trigger and will contain the expected response from the user. The challengeAnswer parameter contains the user's response for the challenge.

"request": { "userAttributes": { "string": "string", .... }, "privateChallengeParameters": { "string": "string", .... }, "challengeAnswer": { "string": "string", .... } }
userAttributes

One or more name-value pairs representing user attributes.

privateChallengeParameters

This parameter is only used by the Verify Auth Challenge Response Lambda trigger. This parameter should contain all of the information that is required to validate the user's response to the challenge. In other words, the publicChallengeParameters parameter contains the question that is presented to the user and privateChallengeParameters contains the valid answers for the question.

challengeAnswer

The answer in the user's response to the challenge.

The response contains the answerCorrect attribute, which is set to true if the user successfully completed the challenge, or false otherwise.

"response": { "answerCorrect": boolean }
answerCorrect

Set to true if the user has successfully completed the challenge, or false otherwise.