Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-cognito): Don't use {username} in verification email templates #12931

Closed
douglasnaphas opened this issue Feb 9, 2021 · 2 comments · Fixed by #13732
Closed

(aws-cognito): Don't use {username} in verification email templates #12931

douglasnaphas opened this issue Feb 9, 2021 · 2 comments · Fixed by #13732
Assignees
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito documentation This is a problem with documentation. effort/small Small work item – less than a day of effort needs-triage This issue or PR still needs to be triaged. p2

Comments

@douglasnaphas
Copy link
Contributor

https://docs.aws.amazon.com/cdk/api/latest/docs/aws-cognito-readme.html#sign-up

The above link has this code sample for setting up user verification:

new cognito.UserPool(this, 'myuserpool', {
  // ...
  selfSignUpEnabled: true,
  userVerification: {
    emailSubject: 'Verify your email for our awesome app!',
    emailBody: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}',
    emailStyle: cognito.VerificationEmailStyle.CODE,
    smsMessage: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}',
  }
});

But the Message Template docs say:

Note
{username} can't be used in verification emails. {username} is available for invitation emails sent after AdminCreateUser call. These invitation emails provide two place holders: username {username} and temporary password {####}

Remove {username} from emailBody, if it is indeed invalid there. I have not tested whether the emailBody and smsMessage from the docs will work in a real User Pool, but I intend to in a test project.


This is a 📕 documentation issue

@douglasnaphas douglasnaphas added documentation This is a problem with documentation. feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2021
@github-actions github-actions bot added the @aws-cdk/aws-cognito Related to Amazon Cognito label Feb 9, 2021
@nija-at
Copy link
Contributor

nija-at commented Mar 22, 2021

Sounds good. I'm sure that 'Note' in the documentation is a recent additional and wasn't present when this code was original written.

@nija-at nija-at added effort/small Small work item – less than a day of effort p2 and removed feature-request A feature should be added or improved. labels Mar 22, 2021
nija-at pushed a commit that referenced this issue Mar 22, 2021
Some minor clarification in the docs.

closes #12932
closes #12931
closes #12930
@mergify mergify bot closed this as completed in #13732 Mar 22, 2021
mergify bot pushed a commit that referenced this issue Mar 22, 2021
Minor clarification in the docs.

closes #12932
closes #12931
closes #12930


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.

nija-at pushed a commit that referenced this issue Mar 23, 2021
Minor clarification in the docs.

closes #12932
closes #12931
closes #12930


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue Mar 24, 2021
Minor clarification in the docs.

closes #12932
closes #12931
closes #12930


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Minor clarification in the docs.

closes aws#12932
closes aws#12931
closes aws#12930


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito documentation This is a problem with documentation. effort/small Small work item – less than a day of effort needs-triage This issue or PR still needs to be triaged. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants