React to Identity changes
This commit is contained in:
parent
b440d4ff66
commit
fe30a0418e
|
|
@ -44,7 +44,7 @@ namespace MusicStore.Spa
|
||||||
|
|
||||||
// Add Identity services to the service container
|
// Add Identity services to the service container
|
||||||
services.AddIdentitySqlServer<ApplicationDbContext, ApplicationUser>()
|
services.AddIdentitySqlServer<ApplicationDbContext, ApplicationUser>()
|
||||||
.AddHttpSignIn();
|
.AddAuthentication();
|
||||||
|
|
||||||
// Add application services to the service container
|
// Add application services to the service container
|
||||||
services.AddScoped<MusicStoreContext>();
|
services.AddScoped<MusicStoreContext>();
|
||||||
|
|
@ -60,7 +60,7 @@ namespace MusicStore.Spa
|
||||||
// Add cookie auth
|
// Add cookie auth
|
||||||
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
||||||
{
|
{
|
||||||
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
AuthenticationType = ClaimsIdentityOptions.DefaultAuthenticationType,
|
||||||
LoginPath = new PathString("/Account/Login")
|
LoginPath = new PathString("/Account/Login")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ namespace MusicStore
|
||||||
|
|
||||||
// Add Identity services to the services container
|
// Add Identity services to the services container
|
||||||
services.AddIdentitySqlServer<MusicStoreContext, ApplicationUser>()
|
services.AddIdentitySqlServer<MusicStoreContext, ApplicationUser>()
|
||||||
.AddHttpSignIn();
|
.AddAuthentication();
|
||||||
|
|
||||||
// Add MVC services to the services container
|
// Add MVC services to the services container
|
||||||
services.AddMvc();
|
services.AddMvc();
|
||||||
|
|
@ -77,7 +77,7 @@ namespace MusicStore
|
||||||
// Add cookie-based authentication to the request pipeline
|
// Add cookie-based authentication to the request pipeline
|
||||||
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
||||||
{
|
{
|
||||||
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
AuthenticationType = ClaimsIdentityOptions.DefaultAuthenticationType,
|
||||||
LoginPath = new PathString("/Account/Login"),
|
LoginPath = new PathString("/Account/Login"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue