Description
The IdentityApiEndpointRouteBuilderExtensions
should never create a ConfirmationLink but must be dealing with codes only.
When we see the implementation of IEmailSender<TUser>
We see SendConfirmationLinkAsync
, SendPasswordResetCodeAsync
and SendPasswordResetLinkAsync
Here the SendPasswordResetLinkAsync
and the SendConfirmationLinkAsync
should be removed and a SendConfirmationCodeAsync
should be added.
The SendPasswordResetCodeAsync
is used in the ApiEndpoint but SendPasswordResetLinkAsync
is never used in the Api.
Only in the UI implementation.
When we want to generate a link instead of using the code, we should generating the link inside the IEmailSender<TUser>
implementation.
So only SendConfirmationCodeAsync
and SendPasswordResetCodeAsync
sould be sufficient in the IEmailSender<TUser>
interface
IdentityApiEndpointRouteBuilderExtensions.cs
aspnetcore/src/Identity/Core/src/IdentityApiEndpointRouteBuilderExtensions.cs
Lines 214 to 217 in 65f485e
ForgotPassword.cshtml.cs
The ForgotPassword.cshtml.cs should also be using the SendPasswordResetCodeAsync
inside the implementation of the emailsender we sould generate the callbackUrl.
Activity