You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is, in part, a research ticket. I'm not sure if this is necessary, but I just recently created a new project using Identity for the first time since upgrading to 3.0 and the default register page wants you to set up email verification of your users' email addresses--Submitting the register form now seems to bring you to a view that suggests you (the developer) should set up an IEmailSender service for email verification. Here is the code I ran into in OnPostAsync
if(result.Succeeded){_logger.LogInformation("User created a new account with password.");varcode=await_userManager.GenerateEmailConfirmationTokenAsync(user);code=WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));varcallbackUrl=Url.Page("/Account/ConfirmEmail",pageHandler:null,values:new{area="Identity",userId=user.Id,code=code},protocol:Request.Scheme);await_emailSender.SendEmailAsync(Input.Email,"Confirm your email",$"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.");if(_userManager.Options.SignIn.RequireConfirmedAccount){returnRedirectToPage("RegisterConfirmation",new{email=Input.Email});}else{await_signInManager.SignInAsync(user,isPersistent:false);returnLocalRedirect(returnUrl);}}foreach(varerrorinresult.Errors){ModelState.AddModelError(string.Empty,error.Description);}
I suggest this edit, but this might be something worth further consideration. Maybe you do actually want to set up an email verification system?
if(result.Succeeded){_logger.LogInformation("User created a new account with password.");await_signInManager.SignInAsync(user,isPersistent:false);returnLocalRedirect(returnUrl);}foreach(varerrorinresult.Errors){ModelState.AddModelError(string.Empty,error.Description);}
The text was updated successfully, but these errors were encountered:
This is, in part, a research ticket. I'm not sure if this is necessary, but I just recently created a new project using Identity for the first time since upgrading to 3.0 and the default register page wants you to set up email verification of your users' email addresses--Submitting the register form now seems to bring you to a view that suggests you (the developer) should set up an
IEmailSender
service for email verification. Here is the code I ran into inOnPostAsync
I suggest this edit, but this might be something worth further consideration. Maybe you do actually want to set up an email verification system?
The text was updated successfully, but these errors were encountered: