Код: Выделить всё
var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({region: 'eu-central-1'});
const poolData = {
UserPoolId: "userPoolId",
ClientId: "clientId",
}
let username = document.getElementById('username').value;
let password = document.getElementById('password').value;
var aws_params = {
AuthFlow: "USER_PASSWORD_AUTH",
AuthParameters: {
"PASSWORD": password,
"SECRET_HASH": "secretHash",
"USERNAME": username
},
ClientId: "clientId",
};
response = cognitoidentityserviceprovider.initiateAuth(aws_params);
Код: Выделить всё
{
"request": {…},
"data": null,
"error": null,
"retryCount": 0,
"redirectCount": 0,
"httpResponse": {…},
"maxRetries": 3,
"maxRedirects": 10
Любые рекомендации приветствуются!
Подробнее здесь: https://stackoverflow.com/questions/793 ... user-in-ja
Мобильная версия