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

@@ -126,7 +126,7 @@ final class CognitoAuthFlowHandler {
case "ADMIN_USER_PASSWORD_AUTH", "ADMIN_NO_SRP_AUTH", "USER_PASSWORD_AUTH" ->
authenticateWithPassword(pool, client, authParameters, clientMetadata);
case "REFRESH_TOKEN_AUTH", "REFRESH_TOKEN" -> handleRefreshToken(pool, client, authParameters, clientMetadata);
case "ADMIN_USER_SRP_AUTH" -> handleUserSrpAuth(pool, client, authParameters, clientMetadata);
case "ADMIN_USER_SRP_AUTH", "USER_SRP_AUTH" -> handleUserSrpAuth(pool, client, authParameters, clientMetadata);
case "CUSTOM_AUTH" -> handleCustomAuth(pool, client, authParameters, clientMetadata);
case "USER_AUTH" -> handleUserAuth(pool, client, authParameters, clientMetadata);
default -> throw unsupportedAuthFlow(authFlow);