Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize email verification page AWS Cognito

I am using Amazon Cognito for user authentication. After the user is registered verification email is sent to his email address. After clicking on the email link he is prompted with this in his browser.

Aws verification page

How can I customize this page in order to insert a script that will trigger deep links within the mobile application, and also make the page look bit nicer?

like image 607
ahmetovicajdin Avatar asked May 08 '20 22:05

ahmetovicajdin


People also ask

How do I customize my AWS Cognito login page?

Sign in to the Amazon Cognito console . In the navigation pane, choose User Pools, and choose the user pool you want to edit. Choose the App integration tab. To customize UI settings for all app clients, locate Hosted UI customization and select Edit.

How do I verify my email on AWS Cognito?

Amazon Cognito can automatically verify email addresses or phone numbers. To do this verification, Amazon Cognito sends a verification code or a verification link. For email addresses, Amazon Cognito can send a code or a link in an email message. For phone numbers, Amazon Cognito sends a code in an SMS text message.

Can we change email in Cognito?

To update your account email address:In your Cognito Forms account, find your name at the top right corner and select My Account. Select the Email Address option and enter your new email address along with your password. If you cannot remember your password, use the Reset Password link to create a new one. Hit Save.

How can my users verify their email address with Amazon Cognito?

You can choose one of two methods for your user pool's users to verify their email address with Amazon Cognito. They can enter a code, or click on a link, sent to them in an email message.

How do I Configure my Amazon Cognito user pool for SMS?

To configure your Amazon Cognito user pool for SMS, see SMS message settings for Amazon Cognito user pools . Amazon Cognito can automatically verify email addresses or mobile phone numbers by sending a verification code—or, for email, a verification link. For email addresses, the code or link is sent in an email message.

How do I customize my email verification messages in Cognito?

In the new Amazon Cognito console experience, you can customize email verification messages in the Messaging tab under the Message templates heading. You can customize the email subject and message content for email address verification messages by editing the template under the Do you want to customize your email verification messages? heading.

How do I test a forgotten password flow with Amazon Cognito?

When you test actions in your app that initiate emails from Amazon Cognito, use a real email address that Amazon Cognito can send to without incurring hard bounces. For more information, see Sending Emails While Testing Your App . The forgotten password flow requires either the user's email or the user's phone number to be verified.


1 Answers

You can do that using Cognito triggers.

You can configure a trigger template to define a message with a link to a page you control. The assets will be stored at: amplify/backend/auth/<your-resource-name>CustomMessage/assets

The documentation has more details

Cognito allows you to configure your User Pool to send an email to your users when they attempt to register an account. You can configure this email to contain a link to Cognito’s Hosted UI where the user’s account will be marked as confirmed.

This trigger template allows you to define an email message with a link to a static S3 bucket that you control, where the user’s account will be confirmed and they can then be redirected to a URL of your choice (presumably your application). The URL will automatically contain the username as a query string parameters.

Please note that this trigger template will create an S3 resource. The files that populate the static site are available for edit in amplify/backend/auth/CustomMessage/assets. They consist of:

index.html
spinner.js (controls the spinner that appears on the page while users are awaiting confirmation)
style.css
verify.js (the script which performs the verification request)
like image 145
dfranca Avatar answered Sep 16 '22 18:09

dfranca