aspnet / Templating

[Archived] ASP.NET Core templates for .NET CLI and Visual Studio. Project moved to https://github.com/aspnet/AspNetCore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not accepting privacy policy prevents "Verification email sent" display

dougbu opened this issue · comments

When using Bootstrap 4 / .NET Core 2.2 Identity (Individual Auth) templates, "Send verification email" link does not display "Verification email sent" box unless Privacy has been accepted.

Repro steps

  1. Open Visual Studio after installing latest .NET Core SDK
  2. File --> New --> Project…
  3. Click on ASP.NET Core Web Application
  4. Click on Web Application or Web Application (Model-View-Controller)
  5. Confirm ASP.NET Core 2.2 is selected in rightmost drop-down control
  6. Click Change Authentication
  7. Click Individual User Accounts
  8. Click 🆗
  9. Click 🆗
  10. Debug --> Start Without Debugging
  11. If necessary, delete cookies for localhost and refresh home page to display the Privacy / Content acceptance banner
  12. Click Register
  13. Fill in form and click 🆗
  14. Click Apply Migrations
  15. Refresh page
  16. Click Hello {your email}
  17. Click Send verification email
Expected

image

Actual

image

Found while verifying aspnet/Release#324

commented

@javiercn, can you please look into this. We should fix this as part of 2.2 release.

@mkArtakMSFT This is by design. What Doug is referring to is the cookie policy, which governs non-essential cookies, like the temp data one. This was discussed at the time and we agreed that it is not guaranteed for the site to work if the cookie policy is not accepted.

This can be opted out by making the temp data cookie essential.

services.AddMvc()
   .AddCookieTempDataProvider(o => o.Cookie.IsEssential = true);