diff --git a/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AuthConfiguration.kt b/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AuthConfiguration.kt index d52badb07..9a3274dfb 100644 --- a/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AuthConfiguration.kt +++ b/aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AuthConfiguration.kt @@ -202,16 +202,16 @@ data class AuthConfiguration internal constructor( length = passwordLength, requiresNumber = passwordRequirements.contains("REQUIRES_NUMBERS"), requiresSpecial = passwordRequirements.contains("REQUIRES_SYMBOLS"), - requiresLower = passwordRequirements.contains("REQUIRES_LOWER"), - requiresUpper = passwordRequirements.contains("REQUIRES_UPPER") + requiresLower = passwordRequirements.contains("REQUIRES_LOWERCASE"), + requiresUpper = passwordRequirements.contains("REQUIRES_UPPERCASE") ) } private fun PasswordProtectionSettings.toGen1Json() = JSONObject().apply { put("passwordPolicyMinLength", length) val characters = JSONArray().apply { - if (requiresLower) put("REQUIRES_LOWER") - if (requiresUpper) put("REQUIRES_UPPER") + if (requiresLower) put("REQUIRES_LOWERCASE") + if (requiresUpper) put("REQUIRES_UPPERCASE") if (requiresNumber) put("REQUIRES_NUMBERS") if (requiresSpecial) put("REQUIRES_SYMBOLS") } diff --git a/aws-auth-cognito/src/test/java/com/amplifyframework/auth/cognito/AuthConfigurationTest.kt b/aws-auth-cognito/src/test/java/com/amplifyframework/auth/cognito/AuthConfigurationTest.kt index 915e7af2b..c5e2c6881 100644 --- a/aws-auth-cognito/src/test/java/com/amplifyframework/auth/cognito/AuthConfigurationTest.kt +++ b/aws-auth-cognito/src/test/java/com/amplifyframework/auth/cognito/AuthConfigurationTest.kt @@ -73,7 +73,7 @@ class AuthConfigurationTest { ], "passwordProtectionSettings": { "passwordPolicyMinLength": 10, - "passwordPolicyCharacters": ["REQUIRES_NUMBERS", "REQUIRES_LOWER"] + "passwordPolicyCharacters": ["REQUIRES_NUMBERS", "REQUIRES_LOWERCASE"] }, "mfaConfiguration": "OFF", "mfaTypes": [