diff --git a/aspnetcore/fundamentals/index.md b/aspnetcore/fundamentals/index.md index c883e4e9ab..c68cc400a6 100644 --- a/aspnetcore/fundamentals/index.md +++ b/aspnetcore/fundamentals/index.md @@ -5,7 +5,7 @@ description: Learn the foundational concepts for building ASP.NET Core apps. monikerRange: '>= aspnetcore-2.1' ms.author: riande ms.custom: mvc -ms.date: 11/07/2019 +ms.date: 01/15/2020 uid: fundamentals/index --- # ASP.NET Core fundamentals @@ -305,6 +305,12 @@ Prevent publishing files in *wwwroot* with the [\ project item](/visual ``` +::: moniker range=">= aspnetcore-3.0" + +To prevent publishing static Identity assets to the web root, see . + +::: moniker-end + In Razor (*.cshtml*) files, the tilde-slash (`~/`) points to the web root. A path beginning with `~/` is referred to as a *virtual path*. For more information, see . diff --git a/aspnetcore/security/authentication/identity.md b/aspnetcore/security/authentication/identity.md index e520811248..f78402a28e 100644 --- a/aspnetcore/security/authentication/identity.md +++ b/aspnetcore/security/authentication/identity.md @@ -3,7 +3,7 @@ title: Introduction to Identity on ASP.NET Core author: rick-anderson description: Use Identity with an ASP.NET Core app. Learn how to set password requirements (RequireDigit, RequiredLength, RequiredUniqueChars, and more). ms.author: riande -ms.date: 12/05/2019 +ms.date: 01/15/2020 uid: security/authentication/identity --- # Introduction to Identity on ASP.NET Core @@ -208,6 +208,22 @@ See [Configuration](#pw) for a sample that sets the minimum password requirement See [AddDefaultIdentity source](https://github.com/dotnet/AspNetCore/blob/release/3.0/src/Identity/UI/src/IdentityServiceCollectionUIExtensions.cs#L47-L63) for more information. +## Prevent publish of static Identity assets + +To prevent publishing static Identity assets (stylesheets and JavaScript files for Identity UI) to the web root, add the following `ResolveStaticWebAssetsInputsDependsOn` property and `RemoveIdentityAssets` target to the app's project file: + +```xml + + RemoveIdentityAssets + + + + + + + +``` + ## Next Steps * See [this GitHub issue](https://github.com/aspnet/AspNetCore.Docs/issues/5131) for information on configuring Identity using SQLite. diff --git a/aspnetcore/security/authentication/scaffold-identity.md b/aspnetcore/security/authentication/scaffold-identity.md index a723183ca8..727dd4e2f3 100644 --- a/aspnetcore/security/authentication/scaffold-identity.md +++ b/aspnetcore/security/authentication/scaffold-identity.md @@ -5,7 +5,7 @@ description: Learn how to scaffold Identity in an ASP.NET Core project. monikerRange: '>= aspnetcore-2.1' ms.author: riande ms.custom: mvc -ms.date: 10/24/2018 +ms.date: 01/15/2020 uid: security/authentication/scaffold-identity --- # Scaffold Identity in ASP.NET Core projects @@ -251,6 +251,10 @@ The following code outlines adding a user: A similar approach can be followed for production scenarios. +## Prevent publish of static Identity assets + +To prevent publishing static Identity assets to the web root, see . + ## Additional resources * [Changes to authentication code to ASP.NET Core 2.1 and later](xref:migration/20_21#changes-to-authentication-code)