Skip to content

Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.

Allow user pool client secrets to be created by Cloudformation (#403)

mgius-aed785245d12ca
diff --git a/ministack/services/cloudformation/provisioners.py b/ministack/services/cloudformation/provisioners.py
index f9b27745..b29ced41 100644
--- a/ministack/services/cloudformation/provisioners.py
+++ b/ministack/services/cloudformation/provisioners.py
@@ -1425,7 +1425,7 @@ def _cognito_user_pool_client_create(logical_id, props, stack_name):
"UserPoolId": pid,
"ClientName": props.get("ClientName", ""),
"ClientId": cid,
- "ClientSecret": None,
+ "ClientSecret": props.get("GenerateSecret", False) and _cognito._client_secret() or None,
"CreationDate": now,
"LastModifiedDate": now,
"ExplicitAuthFlows": props.get("ExplicitAuthFlows", []),