これは、唯一のcognitoを使用して、私の認証フローである私のために正常に動作します:
var authenticationData = {
Username: document.getElementById("user").value,
Password: document.getElementById("password").value
};
var authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails(authenticationData);
var poolData = {
UserPoolId: AWSConfiguration.UserPoolId,
ClientId: AWSConfiguration.ClientAppId
};
userPool = new AmazonCognitoIdentity.CognitoUserPool(poolData);
var userData = {
Username: document.getElementById("user").value,
Pool: userPool
};
var cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
cognitoUser.authenticateUser(authenticationDetails, {
// authenticate here