diff --git a/samples/IdentitySample.Mvc/Startup.cs b/samples/IdentitySample.Mvc/Startup.cs
index 4a8d6338de..1b337c0185 100644
--- a/samples/IdentitySample.Mvc/Startup.cs
+++ b/samples/IdentitySample.Mvc/Startup.cs
@@ -1,7 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
+using IdentitySample.Models;
+using IdentitySample.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
@@ -9,11 +7,6 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
-using IdentitySample.Models;
-using IdentitySample.Services;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.DataProtection;
-using System.IO;
namespace IdentitySample
{
@@ -68,7 +61,7 @@ namespace IdentitySample
app.UseStaticFiles();
- // To configure external authentication please see http://go.microsoft.com/fwlink/?LinkID=532715
+ app.UseAuthentication();
app.UseMvc(routes =>
{
diff --git a/src/Microsoft.AspNetCore.Identity/BuilderExtensions.cs b/src/Microsoft.AspNetCore.Identity/BuilderExtensions.cs
index e5136c7bef..7fb473820c 100644
--- a/src/Microsoft.AspNetCore.Identity/BuilderExtensions.cs
+++ b/src/Microsoft.AspNetCore.Identity/BuilderExtensions.cs
@@ -15,7 +15,8 @@ namespace Microsoft.AspNetCore.Builder
///
/// The instance this method extends.
/// The instance this method extends.
- [Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", error: true)]
- public static IApplicationBuilder UseIdentity(this IApplicationBuilder app) => app;
+ [Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470")]
+ public static IApplicationBuilder UseIdentity(this IApplicationBuilder app)
+ => app.UseAuthentication();
}
}
\ No newline at end of file