как связать пользователя с группой без знаний с помощью amazon-cognito-identity- js
const createLoginCognito = async ({
documentNumber, password, uuid,
}) => {
const userPool = await createUserPoolData();
// WHEN CREATE USER POOL?
const attributeList = [];
attributeList.push(new awsCognito.CognitoUserAttribute({ Name: 'custom:uuid', Value: uuid }));
// ADD GROUP AS ATTRIBUTE?
return new Promise((resolve, reject) => {
userPool.signUp(documentNumber, password, attributeList, null, (err, result) => {
if (err) {
reject(err);
}
resolve(result);
});
});
};