简体   繁体   English

无法在 Cognito 托管 UI 中确认注册用户

[英]Can’t confirm signed up user in cognito hosted UI

I am using Cognito user pools to create and authentication system.我正在使用 Cognito 用户池来创建和验证系统。

Everything works perfectly.一切都很完美。 However, there is one scenario that I cannot figure out a solution for.但是,有一种情况我无法找到解决方案。

When a user signs up, a confirmation code is sent to the user's email. Let's say the user accidentally closed the tab and tried signing up with the same email. Then, an error message will show up stating that the user already exists.当用户注册时,确认码会发送到用户的 email。假设用户不小心关闭了选项卡并尝试使用相同的 email 进行注册。然后,将显示一条错误消息,指出该用户已经存在。 If the users heads to the log in page and logs in using his email. An error shows up stating that the user is not confirmed.如果用户前往登录页面并使用他的 email 登录。会出现一个错误,指出用户未被确认。

Basically, the user is stuck.基本上,用户被卡住了。

My question is, how can a user confirm their email if the current sign up page was closed?我的问题是,如果当前注册页面已关闭,用户如何确认他们的 email? How can I redirect the user to a confirmation page?如何将用户重定向到确认页面?

I came accross the exact same problem.我遇到了完全相同的问题。 The only but simple solution I found is to change the verification type from code to link.我找到的唯一但简单的解决方案是将验证类型从代码更改为链接。 This is done within the verifcation message settings under messaging.这是在消息传递下的验证消息设置中完成的。

After doing that the user does not get a code anymore, instead he gets a link to click on.这样做之后,用户不再获得代码,而是获得一个可以点击的链接。 When he later comes back to the log in page, he is confirmed already and can enter his credentials right away.当他稍后返回登录页面时,他已经被确认并且可以立即输入他的凭据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM