fix(cognito): accept USER_SRP_AUTH in AdminInitiateAuth (#3973)

AdminInitiateAuth documents USER_SRP_AUTH as a valid AuthFlow, but only the ADMIN_USER_SRP_AUTH spelling, which is not an AuthFlowType value, was mapped. Accept the SDK spelling alongside it.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-09-20 16:56:58 -04:00
1 parent db2e0ab8d7
commit 2d56d85e9e
3 files changed
+15 -2

No files matched your search

@@ -191,6 +191,19 @@ class CognitoServiceTest {
assertTrue(result.containsKey("AuthenticationResult"));
}
@Test
void adminInitiateAuthAcceptsTheSdkSpellingOfSrpAuth() {
UserPool pool = createPoolAndUser();
UserPoolClient client = service.createUserPoolClient(
pool.getId(), "client", false, false, List.of(), List.of());
AwsException exception = assertThrows(AwsException.class, () ->
service.adminInitiateAuth(pool.getId(), client.getClientId(), "USER_SRP_AUTH",
Map.of("USERNAME", "alice")));
assertEquals("USERNAME and SRP_A are required", exception.getMessage());
}
@ParameterizedTest
@CsvSource({
"Short1!a",