In .NET Core 2.0 the Authentication Classes have been majorly redesigned in the upcoming version of the cross-plattform framework.

The old

app.UseCookieAuthentication(new CookieAuthenticationOptions{...});

is deprecated now and therefore not working anymore. Which leads to major problems with the website’s authentication mechanism.


in your

public void Configure(IApplicationBuilder app, IHostingEnvironment env)

method has been replaced by the

public void ConfigureServices(IServiceCollection services){
     services.AddCookieAuthentication( options => {...});

In your Configure(…) method a simple


call now is sufficient.

Furthermore the


Mechanism has been redesigned as well.

Instead of

AuthenticationManager.SignInAsync(string authscheme, ClaimsPrinciple cp);

a call to the HttpContext itself is necessary

HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, claimsPrinciple);

So HttpContext.Authentication is mostly(?) obsolete.
The needed namespaces are:

using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;

Keep an eye on the Git Repository, you’ll find most of the information there:

Most importantly: