Я работаю над аутентификацией пользователя на AWS Cognito Android SDK, но получаю ошибку SRP. Я снимаю флажок ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY и USER_PASSWORD_AUTH и по-прежнему получаю сообщение «Ошибка SRP». Есть ли что-то, что я делаю не так? Мой код ниже
userPool = new CognitoUserPool(getApplicationContext(), "us-east-
2_UMicfarEa", "6q46s4k4jgvmliumcf4h4p94rs",
"t2dmr2ghna2l145qu4nst2gdr5actogeft7blr3eruv2yrvaye", Regions.US_EAST_2);
user = userPool.getUser( userName);
authenticateDetails = new Hashtable();
authenticateDetails.put("username",userName);
authenticateDetails.put("password", passWord);
user = userPool.getUser( userName);
AuthenticationHandler authenticationHandler = new AuthenticationHandler() {
@Override
public void onSuccess(CognitoUserSession userSession, CognitoDevice
newDevice) {}
@Override
public void getAuthenticationDetails(AuthenticationContinuation
authenticationContinuation, String userId) { AuthenticationDetails
authenticationDetails = new AuthenticationDetails(userName, passWord,
authenticateDetails); authenticationContinuation.setAuthenticationDetails(authenticationDetails);
authenticationContinuation.continueTask();}
@Override
public void getMFACode(MultiFactorAuthenticationContinuation
multiFactorAuthenticationContinuation) {
multiFactorAuthenticationContinuation.setMfaCode(mfaVerificationCode);
multiFactorAuthenticationContinuation.continueTask();}
@Override
public void authenticationChallenge(ChallengeContinuation continuation) {}
@Override
public void onFailure(Exception exception) {}
};
user.getSessionInBackground(authenticationHandler);