11import { CfnOutput , CfnResource , Duration , RemovalPolicy } from 'aws-cdk-lib' ;
22import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager' ;
3- import { CfnManagedLoginBranding , UserPool , UserPoolClient } from 'aws-cdk-lib/aws-cognito' ;
3+ import { CfnManagedLoginBranding , ManagedLoginVersion , UserPool , UserPoolClient } from 'aws-cdk-lib/aws-cognito' ;
44import { CnameRecord , IHostedZone } from 'aws-cdk-lib/aws-route53' ;
55import { Construct } from 'constructs' ;
66
@@ -60,6 +60,7 @@ export class Auth extends Construct {
6060 domainName : this . domainName ,
6161 certificate : props . sharedCertificate ,
6262 } ,
63+ managedLoginVersion : ManagedLoginVersion . NEWER_MANAGED_LOGIN ,
6364 } ) ;
6465
6566 new CnameRecord ( this , 'CognitoDomainRecord' , {
@@ -68,8 +69,6 @@ export class Auth extends Construct {
6869 domainName : domain . cloudFrontEndpoint ,
6970 } ) ;
7071
71- ( domain . node . defaultChild as CfnResource ) . addPropertyOverride ( 'ManagedLoginVersion' , 2 ) ;
72-
7372 new CfnManagedLoginBranding ( this , 'Branding' , {
7473 userPoolId : this . userPool . userPoolId ,
7574 clientId : client . userPoolClientId ,
0 commit comments