简体   繁体   English

忘记密码不适用于 .NET Core 3.x 和 React 脚手架

[英]Forgot password not working for .NET Core 3.x and React scaffold

I have a project in .NET Core 3.1 and the frontend with React.我在 .NET Core 3.1 和 React 前端有一个项目。

It was generated using the scaffold instructions from this link .它是使用此链接中的脚手架指令生成的。

When I try to trigger forgot password action, it shows a success page but there's no email being sent.当我尝试触发忘记密码操作时,它显示一个成功页面,但没有发送 email。 The email exists in the database under the AspNetUsers table. email 存在于AspNetUsers表下的数据库中。

What could be wrong?有什么问题?

Some screenshots for reference.一些截图供参考。

在此处输入图像描述

在此处输入图像描述

Please check the values of NormalizedEmail and EmailConfirmed in AspNetUsers.请检查 AspNetUsers 中 NormalizedEmail 和 EmailConfirmed 的值。 If the value of NormalizedEmail is null or the value of EmailConfirmed is false, the email may not be sent By default, the Send Complete screen is displayed even if the email has not been sent.如果 NormalizedEmail 的值为 null 或 EmailConfirmed 的值为 false,则可能不会发送 email 默认情况下,即使尚未发送 email,也会显示发送完成屏幕。 You also need to add an EmailSender in startup.cs.您还需要在 startup.cs 中添加一个 EmailSender。

Send email with .NET Core 2.2 ... 送email配.NET Core 2.2 ...

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

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