我想使用adminInitiateAuth来触发用户迁移lambda函数,但是我的代码给出了以下错误:
"errorType": "UserLambdaValidationException",
"errorMessage": "PreAuthentication failed with error Bad triggerSource PreAuthentication_Authentication.",
"trace": [
"UserLambdaValidationException: PreAuthentication failed with error Bad triggerSource PreAuthentication_Authentication.",代码如下:
const AWS = require('aws-sdk')
const cognito = new AWS.CognitoIdentityServiceProvider()
const params = {
AuthFlow: "ADMIN_NO_SRP_AUTH",
UserPoolId: 'eu-west-2_1111111',
ClientId: '722222222222',
AuthParameters: {
USERNAME: email,
PASSWORD: password
}
}
const response = await cognito.adminInitiateAuth(params).promise();此代码可用于同一帐户中的另一个用户池。
发布于 2022-10-03 22:48:08
似乎在池上设置了一个lambda触发器,该触发器失败并以某种方式不正确地操作。
https://stackoverflow.com/questions/73133620
复制相似问题