Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public void ConfigureServices(IServiceCollection services)
services.Configure<CookiePolicyOptions>(options =>
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(cookieOptions => {
cookieOptions.LoginPath = "/";
services.AddMvc().AddRazorPagesOptions(options => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment