Skip to content

Commit 188f52d

Browse files
feat(cognito): managed login (#33097)
### Issue # (if applicable) None ### Reason for this change Cognito supports for the managed login for the user pool domain. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html However, this feature is not supported by UserPoolDomain L2 construct. ### Description of changes - add `ManagedLoginVersion` enum - add `managedLoginVersion` prop to `UserpoolDomainOptions` ### Describe any new or updated permissions being added None ### Description of how you validated changes Add both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fbb237e commit 188f52d

12 files changed

+572
-1
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/integ-user-pool-domain-managed-login.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"Resources": {
3+
"UserPool6BA7E5F2": {
4+
"Type": "AWS::Cognito::UserPool",
5+
"Properties": {
6+
"AccountRecoverySetting": {
7+
"RecoveryMechanisms": [
8+
{
9+
"Name": "verified_phone_number",
10+
"Priority": 1
11+
},
12+
{
13+
"Name": "verified_email",
14+
"Priority": 2
15+
}
16+
]
17+
},
18+
"AdminCreateUserConfig": {
19+
"AllowAdminCreateUserOnly": true
20+
},
21+
"EmailVerificationMessage": "The verification code to your new account is {####}",
22+
"EmailVerificationSubject": "Verify your new account",
23+
"SmsVerificationMessage": "The verification code to your new account is {####}",
24+
"VerificationMessageTemplate": {
25+
"DefaultEmailOption": "CONFIRM_WITH_CODE",
26+
"EmailMessage": "The verification code to your new account is {####}",
27+
"EmailSubject": "Verify your new account",
28+
"SmsMessage": "The verification code to your new account is {####}"
29+
}
30+
},
31+
"UpdateReplacePolicy": "Delete",
32+
"DeletionPolicy": "Delete"
33+
},
34+
"UserPoolDomainD0EA232A": {
35+
"Type": "AWS::Cognito::UserPoolDomain",
36+
"Properties": {
37+
"Domain": "naonao-user-pool-domain",
38+
"ManagedLoginVersion": 2,
39+
"UserPoolId": {
40+
"Ref": "UserPool6BA7E5F2"
41+
}
42+
}
43+
}
44+
},
45+
"Outputs": {
46+
"Domain": {
47+
"Value": {
48+
"Ref": "UserPoolDomainD0EA232A"
49+
}
50+
}
51+
},
52+
"Parameters": {
53+
"BootstrapVersion": {
54+
"Type": "AWS::SSM::Parameter::Value<String>",
55+
"Default": "/cdk-bootstrap/hnb659fds/version",
56+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
57+
}
58+
},
59+
"Rules": {
60+
"CheckBootstrapVersion": {
61+
"Assertions": [
62+
{
63+
"Assert": {
64+
"Fn::Not": [
65+
{
66+
"Fn::Contains": [
67+
[
68+
"1",
69+
"2",
70+
"3",
71+
"4",
72+
"5"
73+
],
74+
{
75+
"Ref": "BootstrapVersion"
76+
}
77+
]
78+
}
79+
]
80+
},
81+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
82+
}
83+
]
84+
}
85+
}
86+
}

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-managed-login.js.snapshot/manifest.json

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)