Closed fdansey-ostmodern closed 9 months ago
Thank you for your report.
Can you provide a minimal CDK app so I can deploy in my account and reproduce this issue?
@pahud You can use a stack like this to reproduce the issue:
import {
Stack,
StackProps,
} from "aws-cdk-lib";
import { Construct } from "constructs";
import * as cognito from "aws-cdk-lib/aws-cognito";
export class BlarnStack extends Stack {
constructor(
scope: Construct,
id: string,
stackProps: StackProps
) {
super(scope, id, stackProps);
new cognito.UserPool(this, "Hottie" + "Pingi", {
email: cognito.UserPoolEmail.withSES({
fromEmail: `hello@blarn.com`,
fromName: "Charlie",
replyTo: `hello@blarn.com`,
sesRegion: this.region,
sesVerifiedDomain: "blarn.com",
}),
userVerification: {
emailSubject: "Please verify your e-mail",
emailBody: `<p>Welcome to blarn...</p>
<p>{##Custom Text##} and blarn your blarn blarn</p>`,
emailStyle: cognito.VerificationEmailStyle.LINK,
},
accountRecovery: cognito.AccountRecovery.EMAIL_ONLY,
});
}
}
Yes you are right.
I think we have made it static here
And we should change the logic here:
I am making it a p2. Any PR contribution would be welcome and appreciated!
Hey @pahud, any update on this effort?
I'm interested in this as well, any plan to fix this?
Are you accepting PRs for this issue?
Drafted a PR to fix this issue, included the bug fix and updating README with some more examples on LINK
type verification method.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When I change the text in the "{##Verify Email##}" placeholder, e.g. to "{##verify your email##}",
cdk synth
andcdk deploy
commands yield the error,This is incorrect as that documentation states that this string may be customised. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-email-verification-message-customization.html
Help text in the AWS Cognito console reads:
Expected Behavior
I am able to change the
emailBody
property of a UserPool to include the placeholder of format, "{##Verify Your Email##}" with any custom string allowed by AWS Cognito.Current Behavior
cdk synth
andcdk deploy
commands yield the error,Reproduction Steps
Create a stack containing a cognito.UserPool resource with property,
Run
cdk synth
on the stack.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.61.0 (build 34f4926)
Framework Version
No response
Node.js Version
v18.13.0
OS
Ubuntu 22.04.1 LTS
Language
Typescript
Language Version
No response
Other information
No response