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
- Open Visual Studio after installing latest .NET Core SDK
- File --> New --> Project…
- Click on ASP.NET Core Web Application
- Click on Web Application or Web Application (Model-View-Controller)
- Confirm ASP.NET Core 2.2 is selected in rightmost drop-down control
- Click Change Authentication
- Click Individual User Accounts
- Click 🆗
- Click 🆗
- Debug --> Start Without Debugging
- If necessary, delete cookies for localhost and refresh home page to display the Privacy / Content acceptance banner
- Click Register
- Fill in form and click 🆗
- Click Apply Migrations
- Refresh page
- Click Hello {your email}
- Click Send verification email
Expected
Actual
Found while verifying aspnet/Release#324
@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);