Prevent asp.net core 3.1 identity from logging in when cookie consent haven't been given

Viewed 211

I want to prevent asp.net core 3.1 identity from storing login cookies when the user have not given consent.

I followed the documentation on https://docs.microsoft.com/en-us/aspnet/core/security/gdpr?view=aspnetcore-3.1 and added the policy but I can still log in to my web app without accepting cookies.

I did find a workaround by disabling the login button if cookies were not accepted, but I'm looking for another solution where all cookies are blocked including essential ones in till the user gives permission.

Thanks

0 Answers
Related