0
如何從aws認知中獲取所有用戶?AWS通過JS獲取所有用戶的認證信息
我發現這一點:列表的用戶 http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#listUsers-property
var cognito = new AWSCognito.CognitoIdentityServiceProvider;
cognito.listUsers(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
但是當我這樣做,我得到這個錯誤:
沒有里根定義...
也試過這樣:
AWS.config.region = 'eu-central-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'eu-central-1:',
Logins: {
'cognito-idp.eu-central-1.amazonaws.com/eu-central-1_': result.getIdToken().getJwtToken()
}
});
這裏我得到的結果沒有定義...
如何獲取所有用戶?