gpt4 book ai didi

amazon-web-services - 自定义电子邮件验证页面AWS Cognito

转载 作者:行者123 更新时间:2023-12-03 13:40:33 25 4
gpt4 key购买 nike

我正在使用Amazon Cognito进行用户身份验证。用户注册后,验证电子邮件将发送到他的电子邮件地址。单击电子邮件链接后,将在浏览器中提示他。

Aws verification page

我如何自定义此页面,以便插入一个脚本,该脚本将触发移动应用程序内的深层链接,并使该页面看起来更好看?

最佳答案

您可以使用Cognito触发器来做到这一点。

您可以配置触发器模板,以定义一条消息,其中包含指向您所控制页面的链接。
Assets 将存储在:amplify/backend/auth/<your-resource-name>CustomMessage/assets
documentation有更多详细信息

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)

关于amazon-web-services - 自定义电子邮件验证页面AWS Cognito,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61689046/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com