diff --git a/eng/targets/Helix.props b/eng/targets/Helix.props
index 89f7a626b2d6..a522bcfea552 100644
--- a/eng/targets/Helix.props
+++ b/eng/targets/Helix.props
@@ -12,7 +12,7 @@
00:45:00$(MSBuildProjectName)--$(TargetFramework)false
- 16.11.0
+ 20.7.0
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in
index ee04cb442ea1..2ed95f454912 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in
+++ b/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in
@@ -4,7 +4,7 @@
${DefaultNetCoreTargetFramework}enableenable
- aspnet-Company.WebApplication1-0ce56475-d1db-490f-8af1-a881ea4fcd2d
+ aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502TrueCompany.WebApplication1
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/dotnetcli.host.json
index a8c678b039b3..897cc41741ca 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/dotnetcli.host.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/dotnetcli.host.json
@@ -21,6 +21,9 @@
"IncludeSampleContent": {
"isHidden": true
},
+ "UseLocalDB": {
+ "longName": "use-local-db"
+ },
"Framework": {
"longName": "framework"
},
@@ -51,5 +54,8 @@
"longName": "use-program-main",
"shortName": ""
}
- }
+ },
+ "usageExamples": [
+ "-int auto --auth individual --use-local-db"
+ ]
}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.cs.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.cs.json
index a4cec61a3fdf..1058719b3050 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.cs.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.cs.json
@@ -4,6 +4,7 @@
"description": "Šablona projektu pro vytvoření webové aplikace Blazor, která podporuje vykreslování na straně serveru i interaktivitu klienta. Tato šablona se dá použít pro webové aplikace s bohatými dynamickými uživatelskými rozhraními (UI).",
"symbols/Framework/description": "Cílová architektura pro projekt",
"symbols/Framework/choices/net8.0/description": "Cílový net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Pokud se tato možnost zadá, přeskočí automatické obnovení projektu při vytvoření.",
"symbols/ExcludeLaunchSettings/description": "Určuje, jestli se má z vygenerované šablony vyloučit soubor launchSettings.json.",
"symbols/kestrelHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP v souboru launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Zahrnout ukázkové stránky",
"symbols/IncludeSampleContent/description": "Nastavuje, jestli se mají přidávat ukázkové stránky a styly pro demonstraci základních vzorů použití.",
"symbols/Empty/description": "Nastavuje, jestli se mají vynechat ukázkové stránky a styly, které demonstrují základní vzory použití.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Povolit interaktivní vykreslování globálně na celém webu",
"symbols/AllInteractive/description": "Konfiguruje, jestli se má každá stránka nastavit jako interaktivní, a to použitím interaktivního režimu vykreslování na nejvyšší úrovni. Pokud se nastaví na false, stránky budou ve výchozím nastavení používat vykreslování statického serveru a dají se označit jako interaktivní pro jednotlivé stránky nebo komponenty.",
"symbols/NoHttps/description": "Určuje, jestli se má protokol HTTPS vypnout. Tato možnost platí jenom v případě, že se pro --auth nepoužívají Individual, IndividualB2C, SingleOrg ani MultiOrg.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.de.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.de.json
index 34edd5ff3e60..9372f5a4b0b0 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.de.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.de.json
@@ -4,6 +4,7 @@
"description": "Eine Projektvorlage zum Erstellen einer Blazor-Web-App, die sowohl serverseitiges Rendering als auch Clientinteraktivität unterstützt. Diese Vorlage kann für Web-Apps mit umfangreichen dynamischen Benutzeroberflächen (UIs) verwendet werden.",
"symbols/Framework/description": "Das Zielframework für das Projekt.",
"symbols/Framework/choices/net8.0/description": "Ziel net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.",
"symbols/ExcludeLaunchSettings/description": "Ob launchSettings.json aus der generierten Vorlage ausgeschlossen werden soll.",
"symbols/kestrelHttpPort/description": "Portnummer, die für den HTTP Endpunkt in launchSettings.json verwendet werden soll.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Include Beispielseiten",
"symbols/IncludeSampleContent/description": "Konfiguriert, ob Beispielseiten und Stile hinzugefügt werden, um grundlegende Verwendungsmuster zu veranschaulichen.",
"symbols/Empty/description": "Konfiguriert, ob Beispielseiten und Formatierungen weggelassen werden sollen, die grundlegende Verwendungsmuster veranschaulichen.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Aktivieren des interaktiven Renderings global auf der gesamten Website",
"symbols/AllInteractive/description": "Konfiguriert, ob jede Seite interaktiv werden soll, indem ein interaktiver Rendermodus auf der obersten Ebene angewendet wird. False gibt an, dass Seiten standardmäßig statisches Serverrendering verwenden und auf Seiten- oder Komponentenbasis als interaktiv markiert werden können.",
"symbols/NoHttps/description": "Ob HTTPS deaktiviert werden soll. Diese Option gilt nur, wenn Individual, IndividualB2C, SingleOrg oder MultiOrg nicht für --auth verwendet werden.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.en.json
index 60d16e15ffd9..6db424a9f348 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.en.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.en.json
@@ -4,12 +4,13 @@
"description": "A project template for creating a Blazor web app that supports both server-side rendering and client interactivity. This template can be used for web apps with rich dynamic user interfaces (UIs).",
"symbols/Framework/description": "The target framework for the project.",
"symbols/Framework/choices/net8.0/description": "Target net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.",
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.",
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.",
- "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).",
+ "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if Individual auth is used).",
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
- "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).",
+ "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if Individual auth is used).",
"symbols/InteractivityPlatform/displayName": "_Interactivity type",
"symbols/InteractivityPlatform/description": "Chooses which hosting platform to use for interactive components",
"symbols/InteractivityPlatform/choices/None/displayName": "None",
@@ -29,9 +30,13 @@
"symbols/IncludeSampleContent/displayName": "_Include sample pages",
"symbols/IncludeSampleContent/description": "Configures whether to add sample pages and styling to demonstrate basic usage patterns.",
"symbols/Empty/description": "Configures whether to omit sample pages and styling that demonstrate basic usage patterns.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Enable interactive rendering globally throughout the site",
"symbols/AllInteractive/description": "Configures whether to make every page interactive by applying an interactive render mode at the top level. If false, pages will use static server rendering by default, and can be marked interactive on a per-page or per-component basis.",
- "symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
+ "symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual isn't used for --auth.",
"symbols/UseProgramMain/displayName": "Do not use _top-level statements",
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.",
"postActions/restore/description": "Restore NuGet packages required by this project.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.es.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.es.json
index 2837c19d8e89..f016bdcf31b1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.es.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.es.json
@@ -4,6 +4,7 @@
"description": "Plantilla de proyecto para crear una aplicación web de Blazor que admita tanto la representación del lado del servidor como la interactividad del cliente. Esta plantilla se puede usar para las aplicaciones web con interfaces de usuario dinámicas enriquecidas.",
"symbols/Framework/description": "Marco de destino del proyecto.",
"symbols/Framework/choices/net8.0/description": "net8.0 de destino",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Si se especifica, se omite la restauración automática del proyecto durante la creación.",
"symbols/ExcludeLaunchSettings/description": "Indica si se va a excluir launchSettings.json de la plantilla generada.",
"symbols/kestrelHttpPort/description": "Número de puerto que se va a usar para el punto de conexión HTTP en launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Incluir páginas de ejemplo",
"symbols/IncludeSampleContent/description": "Configura si se van a agregar páginas de ejemplo y estilos para mostrar patrones de uso básicos.",
"symbols/Empty/description": "Configura si se omiten las páginas de ejemplo y los estilos que muestran patrones de uso básicos.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Enable representación interactiva globalmente en todo el sitio",
"symbols/AllInteractive/description": "Configura si todas las páginas son interactivas aplicando un modo de representación interactivo en el nivel superior. Si es false, las páginas usarán la representación de servidor estático de forma predeterminada y se pueden marcar como interactivas por página o por componente.",
"symbols/NoHttps/description": "Si se va a desactivar HTTPS. Esta opción solo se aplica si Individual, IndividualB2C, SingleOrg o MultiOrg no se usan para --auth.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.fr.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.fr.json
index 69426fe1e68d..fa5a62f1e40c 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.fr.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.fr.json
@@ -4,6 +4,7 @@
"description": "Modèle de projet pour la création d’une application web Blazor qui prend en charge le rendu côté serveur et l’interactivité du client. Ce modèle peut être utilisé pour les applications web avec des interfaces utilisateur dynamiques enrichies.",
"symbols/Framework/description": "Framework cible du projet.",
"symbols/Framework/choices/net8.0/description": "Cible net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "S’il est spécifié, ignore la restauration automatique du projet lors de la création.",
"symbols/ExcludeLaunchSettings/description": "Indique s’il faut exclure launchSettings.json du modèle généré.",
"symbols/kestrelHttpPort/description": "Numéro de port à utiliser pour le point de terminaison HTTP dans launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Inclure des exemples de pages",
"symbols/IncludeSampleContent/description": "Configure s'il faut ajouter des exemples de pages et de style pour illustrer les modèles d'utilisation de base.",
"symbols/Empty/description": "Configure s'il faut omettre les exemples de pages et le style qui illustrent les modèles d'utilisation de base.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Enable rendu interactif globalement sur l’ensemble du site",
"symbols/AllInteractive/description": "Configure si chaque page doit être interactive en appliquant un mode de rendu interactif au niveau supérieur. Si la valeur est False, les pages utilisent le rendu de serveur statique par défaut et peuvent être marquées comme interactives par page ou par composant.",
"symbols/NoHttps/description": "Indique s’il faut désactiver HTTPS. Cette option s’applique uniquement si Individual, IndividualB2C, SingleOrg ou MultiOrg ne sont pas utilisés pour --auth.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.it.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.it.json
index ce6ab9d14432..27be9e574b7c 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.it.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.it.json
@@ -4,6 +4,7 @@
"description": "Modello di progetto per la creazione di un'app Web Blazor che supporta sia il rendering lato server sia l'interattività client. Questo modello può essere usato per app Web con interfacce utente dinamiche avanzate.",
"symbols/Framework/description": "Il framework di destinazione per il progetto.",
"symbols/Framework/choices/net8.0/description": "Destinazione net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.",
"symbols/ExcludeLaunchSettings/description": "Indica se escludere launchSettings.json dal modello generato.",
"symbols/kestrelHttpPort/description": "Numero di porta da usare per l'endpoint HTTP in launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Include pagine di esempio",
"symbols/IncludeSampleContent/description": "Consente di configurare se aggiungere pagine di esempio e stile per mostrare modelli di utilizzo di base.",
"symbols/Empty/description": "Consente di configurare se omettere pagine di esempio e stile che mostrano modelli di utilizzo di base.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Enable rendering interattivo a livello globale in tutto il sito",
"symbols/AllInteractive/description": "Configura se rendere interattiva ogni pagina applicando una modalità di rendering interattiva al livello superiore. Se false, le pagine useranno il rendering statico del server per impostazione predefinita e possono essere contrassegnate come interattive per pagina o per componente.",
"symbols/NoHttps/description": "Indica se disattivare HTTPS. Questa opzione si applica solo se Individual, IndividualB2C, SingleOrg o MultiOrg non vengono usati per --auth.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ja.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ja.json
index f429a9116d95..5955f279e593 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ja.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ja.json
@@ -4,6 +4,7 @@
"description": "サーバー側のレンダリングとクライアントの対話機能の両方をサポートする Blazor Web アプリを作成するためのプロジェクト テンプレートです。このテンプレートは、リッチな動的ユーザー インターフェイス (UI) を持つ Web アプリに使用できます。",
"symbols/Framework/description": "プロジェクトのターゲット フレームワークです。",
"symbols/Framework/choices/net8.0/description": "ターゲット net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。",
"symbols/ExcludeLaunchSettings/description": "生成されたテンプレートから launchSettings.json を除外するかどうか。",
"symbols/kestrelHttpPort/description": "launchSettings.json の HTTP エンドポイントに使用するポート番号。",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "サンプル ページを含める(_I)",
"symbols/IncludeSampleContent/description": "基本的な使用パターンを示すサンプル ページとスタイルを追加するかどうかを構成します。",
"symbols/Empty/description": "基本的な使用パターンを示すサンプル ページとスタイルを省略するかどうかを構成します。",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "インタラクティビティ レンダリングをサイト全体でグローバルに有効化(_E)",
"symbols/AllInteractive/description": "最上位レベルで対話型レンダリング モードを適用して、すべてのページを対話型にするかどうかを構成します。false の場合、ページは既定で静的サーバー レンダリングを使用し、ページ単位またはコンポーネント単位で対話型としてマークできます。",
"symbols/NoHttps/description": "HTTPS をオフにするかどうか。このオプションは、Individual、IndividualB2C、SingleOrg、または MultiOrg が --auth に使用されていない場合にのみ適用されます。",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ko.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ko.json
index e081f6b2a958..63fd70eb6815 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ko.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ko.json
@@ -4,6 +4,7 @@
"description": "서버 측 렌더링 및 클라이언트 대화형 작업을 모두 지원하는 Blazor 웹앱을 만들기 위한 프로젝트 템플릿입니다. 이 템플릿은 풍부한 동적 UI(사용자 인터페이스)가 있는 웹앱에 사용할 수 있습니다.",
"symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.",
"symbols/Framework/choices/net8.0/description": "대상 net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.",
"symbols/ExcludeLaunchSettings/description": "생성된 템플릿에서 launchSettings.json을 제외할지 여부입니다.",
"symbols/kestrelHttpPort/description": "launchSettings.json의 HTTP 엔드포인트에 사용할 포트 번호입니다.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "샘플 페이지 포함(_I)",
"symbols/IncludeSampleContent/description": "기본 사용 패턴을 보여주기 위해 샘플 페이지 및 스타일을 추가할지 여부를 구성합니다.",
"symbols/Empty/description": "기본 사용 패턴을 보여주는 샘플 페이지 및 스타일을 생략할지 여부를 구성합니다.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_사이트 전체에서 전역적으로 인터랙티브 렌더링 활성화",
"symbols/AllInteractive/description": "최상위 수준에서 대화형 렌더링 모드를 적용하여 모든 페이지를 대화형으로 설정할지 여부를 구성합니다. 만약 false이면 페이지는 기본적으로 정적 서버 렌더링을 사용하며 페이지별 또는 구성 요소별로 대화형으로 표시될 수 있습니다.",
"symbols/NoHttps/description": "HTTPS를 끌지 여부입니다. 이 옵션은 Individual, IndividualB2C, SingleOrg 또는 MultiOrg가 --auth에 사용되지 않는 경우에만 적용됩니다.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pl.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pl.json
index 2ee8283fc2c4..f57d40906a60 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pl.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pl.json
@@ -4,6 +4,7 @@
"description": "Szablon projektu służący do tworzenia aplikacji internetowej platformy Blazor, która obsługuje renderowanie po stronie serwera i interakcyjność klienta. Ten szablon może być używany dla aplikacji internetowych z zaawansowanymi dynamicznymi interfejsami użytkownika.",
"symbols/Framework/description": "Platforma docelowa dla tego projektu.",
"symbols/Framework/choices/net8.0/description": "Docelowa platforma net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.",
"symbols/ExcludeLaunchSettings/description": "Określa, czy wykluczyć plik launchSettings.json z wygenerowanego szablonu.",
"symbols/kestrelHttpPort/description": "Numer portu do użycia dla punktu końcowego HTTP w pliku launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Dołącz przykładowe strony",
"symbols/IncludeSampleContent/description": "Konfiguruje, czy dodać przykładowe strony i style w celu zademonstrowania podstawowych wzorców użycia.",
"symbols/Empty/description": "Konfiguruje, czy pomijać przykładowe strony i style demonstrujące podstawowe wzorce użycia.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Włącz globalnie renderowanie interakcyjne w całej witrynie",
"symbols/AllInteractive/description": "Konfiguruje, czy każda strona ma być interakcyjna, stosując interakcyjny tryb renderowania na najwyższym poziomie. W przypadku wartości false strony będą domyślnie używać statycznego renderowania serwera i mogą być oznaczone jako interakcyjne dla poszczególnych stron lub składników.",
"symbols/NoHttps/description": "Określa, czy wyłączyć protokół HTTPS. Ta opcja ma zastosowanie tylko wtedy, gdy dla uwierzytelniania --auth nie są używane elementy Individual, IndividualB2C, SingleOrg lub MultiOrg.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json
index 0e631971af68..53defa558baa 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json
@@ -4,6 +4,7 @@
"description": "Um modelo de projeto para criar um aplicativo Web Blazor que dá suporte à renderização do lado do servidor e à interatividade do cliente. Este modelo pode ser usado para aplicativos da Web com interfaces de usuário (UIs) dinâmicas avançadas.",
"symbols/Framework/description": "A estrutura de destino do projeto.",
"symbols/Framework/choices/net8.0/description": "net8.0 de destino",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.",
"symbols/ExcludeLaunchSettings/description": "Se deve excluir launchSettings.json do modelo gerado.",
"symbols/kestrelHttpPort/description": "Número da porta a ser usada para o ponto de extremidade HTTP em launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Incluir páginas de amostra",
"symbols/IncludeSampleContent/description": "Configura se deseja adicionar páginas de amostra e estilo para demonstrar padrões de uso básicos.",
"symbols/Empty/description": "Configura a omissão de páginas de amostra e estilo que demonstram padrões básicos de uso.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Habilitar renderização interativa globalmente no site",
"symbols/AllInteractive/description": "Configura se todas as páginas devem ser interativas aplicando um modo de renderização interativo no nível superior. Se for falso, as páginas usarão a renderização do servidor estático por padrão e poderão ser marcadas como interativas por página ou por componente.",
"symbols/NoHttps/description": "Se o HTTPS deve ser desativado. Essa opção se aplica somente se Individual, IndividualB2C, SingleOrg ou MultiOrg não forem usados para --auth.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ru.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ru.json
index 4da19a19c1d5..8319cf95c2dd 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ru.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.ru.json
@@ -4,6 +4,7 @@
"description": "Шаблон проекта для создания приложения Blazor, поддерживающего как отрисовку на стороне сервера, так и интерактивные возможности клиента. Этот шаблон можно использовать для веб-приложений с многофункциональными динамическими пользовательскими интерфейсами (UI).",
"symbols/Framework/description": "Целевая платформа для проекта.",
"symbols/Framework/choices/net8.0/description": "Целевая net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Если установлено, автоматическое восстановление проекта при создании пропускается.",
"symbols/ExcludeLaunchSettings/description": "Следует ли исключить launchSettings.json из созданного шаблона.",
"symbols/kestrelHttpPort/description": "Номер порта, используемый для конечной точки HTTP в launchSettings.json.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "_Включить примеры страниц",
"symbols/IncludeSampleContent/description": "Настраивает, следует ли добавлять примеры страниц и стили для демонстрации базовых шаблонов использования.",
"symbols/Empty/description": "Настраивает, следует ли пропускать примеры страниц и стили, демонстрирующие базовые шаблоны использования.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Включить интерактивную отрисовку по всему сайту",
"symbols/AllInteractive/description": "Определяет, делать ли каждую страницу интерактивной, применяя интерактивный режим отрисовки на верхнем уровне. Если установлено значение ЛОЖЬ, страницы по умолчанию будут использовать статическую серверную отрисовку и могут быть помечены как интерактивные для каждой страницы или для каждого компонента.",
"symbols/NoHttps/description": "Следует ли отключить HTTPS. Этот параметр применяется, только если для --auth не используются Individual, IndividualB2C, SingleOrg или MultiOrg.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.tr.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.tr.json
index c48be5fb6517..3a754dfabdc6 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.tr.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.tr.json
@@ -4,6 +4,7 @@
"description": "Hem sunucu tarafı işlemeyi hem de istemci etkileşimini destekleyen bir Blazor web uygulaması oluşturmaya yönelik proje şablonu. Bu şablon, zengin dinamik kullanıcı arabirimlerine (UI) sahip web uygulamaları için kullanılabilir.",
"symbols/Framework/description": "Projenin hedef çerçevesi.",
"symbols/Framework/choices/net8.0/description": "Hedef net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.",
"symbols/ExcludeLaunchSettings/description": "launchSettings.json öğesinin oluşturulan şablondan dışlanıp dışlanmayacağı.",
"symbols/kestrelHttpPort/description": "launchSettings.json içinde HTTP uç noktası için kullanılacak bağlantı noktası numarası.",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "Örnek _sayfalar ekle",
"symbols/IncludeSampleContent/description": "Temel kullanım düzenlerini göstermek için örnek sayfaların ve stil oluşturma özelliklerinin eklenip eklenmeyeceğini yapılandırır.",
"symbols/Empty/description": "Temel kullanım düzenlerini gösteren örnek sayfaların ve stil oluşturma özelliklerinin atlanıp atlanmayacağını yapılandırır.",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_Site genelinde etkileşimli işlemeyi genel olarak etkinleştirin",
"symbols/AllInteractive/description": "En üst düzeyde etkileşimli bir işleme modu uygulayarak her sayfanın etkileşimli olup olmayacağını yapılandırır. False ise sayfalar varsayılan olarak statik sunucu işleme kullanır ve sayfa başına veya bileşen başına temelinde etkileşimli olarak işaretlenebilir.",
"symbols/NoHttps/description": "HTTPS'nin kapatılıp kapatılmayacağı. Bu seçenek yalnızca Bireysel, IndividualB2C, SingleOrg veya MultiOrg -- auth için kullanılmazsa geçerlidir.",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json
index 2ae798e0ebdd..05fd5dde01ff 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json
@@ -4,6 +4,7 @@
"description": "用于创建支持服务器端呈现和客户端交互的 Blazor Web 应用的项目模板。此模板可用于具有丰富动态用户界面 (UI) 的 Web 应用。",
"symbols/Framework/description": "项目的目标框架。",
"symbols/Framework/choices/net8.0/description": "目标 net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。",
"symbols/ExcludeLaunchSettings/description": "是否从生成的模板中排除 launchSettings.json。",
"symbols/kestrelHttpPort/description": "要用于 launchSettings.json 中 HTTP 终结点的端口号。",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "包含示例页(_I)",
"symbols/IncludeSampleContent/description": "配置是否添加示例页和样式以演示基本使用模式。",
"symbols/Empty/description": "配置是否忽略演示基本使用模式的示例页和样式。",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_在整个网站全局启用交互式呈现",
"symbols/AllInteractive/description": "配置是否通过在顶层应用交互式呈现模式来使每个页面都交互。如果为 false,则默认情况下,页面将使用静态服务器呈现,并且可以按每页或每组件标记为交互。",
"symbols/NoHttps/description": "是否禁用 HTTPS。仅当 Individual、IndividualB2C、SingleOrg 或 MultiOrg 不用于 --auth 时,此选项才适用。",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json
index cb0dcf1feec7..a80cdf669b9a 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json
@@ -4,6 +4,7 @@
"description": "用於建立同時支援伺服器端轉譯和用戶端互動的 Blazor Web 應用程式的專案範本。此範本可用於具有豐富動態使用者介面 (UI) 的 Web 應用程式。",
"symbols/Framework/description": "專案的目標 Framework。",
"symbols/Framework/choices/net8.0/description": "目標 net8.0",
+ "symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "若指定,會在建立時跳過專案的自動還原。",
"symbols/ExcludeLaunchSettings/description": "是否要從產生的範本排除 launchSettings.json。",
"symbols/kestrelHttpPort/description": "launchSettings.json 中 HTTP 端點要使用的連接埠號碼。",
@@ -29,6 +30,10 @@
"symbols/IncludeSampleContent/displayName": "包含範例頁面(_I)",
"symbols/IncludeSampleContent/description": "設定是否要新增範例頁面和樣式,以示範基本使用模式。",
"symbols/Empty/description": "設定是否要省略範例頁面和樣式,其示範基本使用模式。",
+ "symbols/auth/choices/None/description": "No authentication",
+ "symbols/auth/choices/Individual/description": "Individual authentication",
+ "symbols/auth/description": "The type of authentication to use",
+ "symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified.",
"symbols/AllInteractive/displayName": "_啟用整個網站的全域互動式轉譯",
"symbols/AllInteractive/description": "設定是否要在最上層套用互動式轉譯模式,讓每個頁面都成為互動式。如果為 false,則頁面預設會使用靜態伺服器轉譯,而且可以以每頁或每一元件為基礎標示為互動式。",
"symbols/NoHttps/description": "是否要關閉 HTTPS。只有當 Individual、IndividualB2C、SingleOrg 或 MultiOrg 未用於 --auth 時,才適用此選項。",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json
index 525989d38e39..1e36b02d8939 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json
@@ -14,7 +14,8 @@
"guids": [
"4C26868E-5E7C-458D-82E3-040509D0C71F",
"5990939C-7E7B-4CFA-86FF-44CA5756498A",
- "650B3CE7-2E93-4CC4-9F46-466686815EAA"
+ "650B3CE7-2E93-4CC4-9F46-466686815EAA",
+ "53bc9b9d-9d6a-45d4-8429-2a2761773502"
],
"identity": "Microsoft.Web.Blazor.CSharp.9.0",
"thirdPartyNotices": "https://aka.ms/aspnetcore/9.0-third-party-notices",
@@ -108,6 +109,86 @@
"BlazorWeb-CSharp.Client/Pages/**",
"BlazorWeb-CSharp.Client/wwwroot/**"
]
+ },
+ {
+ "condition": "(!IndividualLocalAuth)",
+ "exclude": [
+ "BlazorWeb-CSharp/Components/Identity/**",
+ "BlazorWeb-CSharp/Components/Layout/ManageLayout.razor",
+ "BlazorWeb-CSharp/Components/Layout/ManageNavMenu.razor",
+ "BlazorWeb-CSharp/Components/Pages/Account/**",
+ "BlazorWeb-CSharp/Data/**",
+ "BlazorWeb-CSharp/Identity/**",
+ "BlazorWeb-CSharp.Client/PersistentAuthenticationStateProvider.cs",
+ "BlazorWeb-CSharp.Client/UserInfo.cs",
+ "BlazorWeb-CSharp.Client/Pages/Auth.razor"
+ ]
+ },
+ {
+ "condition": "(!(IndividualLocalAuth && !UseLocalDB))",
+ "exclude": [
+ "BlazorWeb-CSharp/app.db"
+ ]
+ },
+ {
+ "condition": "(!(IndividualLocalAuth && !UseWebAssembly))",
+ "exclude": [
+ "BlazorWeb-CSharp/Components/Pages/Auth.razor"
+ ]
+ },
+ {
+ "condition": "(!(IndividualLocalAuth && UseServer && UseWebAssembly))",
+ "exclude": [
+ "BlazorWeb-CSharp/Identity/PersistingRevalidatingAuthenticationStateProvider.cs"
+ ]
+ },
+ {
+ "condition": "(!(IndividualLocalAuth && UseServer && !UseWebAssembly))",
+ "exclude": [
+ "BlazorWeb-CSharp/Identity/IdentityRevalidatingAuthenticationStateProvider.cs"
+ ]
+ },
+ {
+ "condition": "(!(IndividualLocalAuth && !UseServer && UseWebAssembly))",
+ "exclude": [
+ "BlazorWeb-CSharp/Identity/PersistingServerAuthenticationStateProvider.cs"
+ ]
+ },
+ {
+ "condition": "(IndividualLocalAuth && UseLocalDB && UseWebAssembly)",
+ "rename": {
+ "BlazorWeb-CSharp/Data/SqlServer/": "BlazorWeb-CSharp/Data/Migrations/"
+ },
+ "exclude": [
+ "BlazorWeb-CSharp/Data/SqlLite/**"
+ ]
+ },
+ {
+ "condition": "(IndividualLocalAuth && UseLocalDB && !UseWebAssembly)",
+ "rename": {
+ "BlazorWeb-CSharp/Data/SqlServer/": "Data/Migrations/"
+ },
+ "exclude": [
+ "BlazorWeb-CSharp/Data/SqlLite/**"
+ ]
+ },
+ {
+ "condition": "(IndividualLocalAuth && !UseLocalDB && UseWebAssembly)",
+ "rename": {
+ "BlazorWeb-CSharp/Data/SqlLite/": "BlazorWeb-CSharp/Data/Migrations/"
+ },
+ "exclude": [
+ "BlazorWeb-CSharp/Data/SqlServer/**"
+ ]
+ },
+ {
+ "condition": "(IndividualLocalAuth && !UseLocalDB && !UseWebAssembly)",
+ "rename": {
+ "BlazorWeb-CSharp/Data/SqlLite/": "Data/Migrations/"
+ },
+ "exclude": [
+ "BlazorWeb-CSharp/Data/SqlServer/**"
+ ]
}
]
}
@@ -130,6 +211,13 @@
"type": "bind",
"binding": "HostIdentifier"
},
+ "UserSecretsId": {
+ "type": "parameter",
+ "datatype": "string",
+ "replaces": "aspnet-BlazorWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
+ "defaultValue": "aspnet-BlazorWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
+ "description": "The ID to use for secrets (use with Individual auth)."
+ },
"skipRestore": {
"type": "parameter",
"datatype": "bool",
@@ -167,7 +255,7 @@
"kestrelHttpsPort": {
"type": "parameter",
"datatype": "integer",
- "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
+ "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if Individual auth is used)."
},
"kestrelHttpsPortGenerated": {
"type": "generated",
@@ -207,7 +295,7 @@
"iisHttpsPort": {
"type": "parameter",
"datatype": "integer",
- "description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
+ "description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if Individual auth is used)."
},
"iisHttpsPortGenerated": {
"type": "generated",
@@ -261,7 +349,7 @@
"defaultValue": "InteractivePerPage",
"displayName": "_Interactivity location",
"description": "Chooses which components will have interactive rendering enabled",
- "isEnabled": "(InteractivityPlatform != \"None\")",
+ "isEnabled": "(InteractivityPlatform != \"None\" && auth == \"None\")",
"choices": [
{
"choice": "InteractivePerPage",
@@ -296,6 +384,28 @@
"defaultValue": "false",
"description": "Configures whether to omit sample pages and styling that demonstrate basic usage patterns."
},
+ "auth": {
+ "type": "parameter",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "None",
+ "description": "No authentication"
+ },
+ {
+ "choice": "Individual",
+ "description": "Individual authentication"
+ }
+ ],
+ "defaultValue": "None",
+ "description": "The type of authentication to use"
+ },
+ "UseLocalDB": {
+ "type": "parameter",
+ "datatype": "bool",
+ "defaultValue": "false",
+ "description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual is specified."
+ },
"SampleContent": {
"type": "computed",
"value": "(((IncludeSampleContent && (HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\"))) || ((!Empty && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))))"
@@ -303,7 +413,7 @@
"AllInteractive": {
"type": "parameter",
"datatype": "bool",
- "isEnabled": "(InteractivityPlatform != \"None\")",
+ "isEnabled": "(InteractivityPlatform != \"None\" && auth == \"None\")",
"defaultValue": "false",
"displayName": "_Enable interactive rendering globally throughout the site",
"description": "Configures whether to make every page interactive by applying an interactive render mode at the top level. If false, pages will use static server rendering by default, and can be marked interactive on a per-page or per-component basis."
@@ -312,9 +422,13 @@
"type": "computed",
"value": "(InteractivityLocation == \"InteractiveGlobal\" || AllInteractive)"
},
+ "IndividualLocalAuth": {
+ "type": "computed",
+ "value": "(auth == \"Individual\")"
+ },
"RequiresHttps": {
"type": "computed",
- "value": "(OrganizationalAuth || IndividualAuth)"
+ "value": "(OrganizationalAuth || IndividualLocalAuth)"
},
"HasHttpProfile": {
"type": "computed",
@@ -328,7 +442,7 @@
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
- "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
+ "description": "Whether to turn off HTTPS. This option only applies if Individual isn't used for --auth."
},
"copyrightYear": {
"type": "generated",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp.Client/Pages/Auth.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp.Client/Pages/Auth.razor
new file mode 100644
index 000000000000..ebeeeccea168
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp.Client/Pages/Auth.razor
@@ -0,0 +1,18 @@
+@page "/auth"
+
+@using Microsoft.AspNetCore.Authorization
+
+@attribute [Authorize]
+@*#if (UseServer && !InteractiveAtRoot)
+@attribute [RenderModeInteractiveAuto]
+##elseif (!InteractiveAtRoot)
+@attribute [RenderModeInteractiveWebAssembly]
+##endif*@
+
+Auth
+
+
+
+
+@code {
+ string? statusMessage;
+
+ [SupplyParameterFromQuery]
+ public string? UserId { get; set; }
+
+ [SupplyParameterFromQuery]
+ public string? Code { get; set; }
+
+ protected override async Task OnInitializedAsync()
+ {
+ if (UserId == null || Code == null)
+ {
+ RedirectManager.RedirectTo("/");
+ }
+ else
+ {
+ var user = await UserManager.FindByIdAsync(UserId);
+ if (user == null)
+ {
+ // Need a way to trigger a 404 from Blazor: https://github.com/dotnet/aspnetcore/issues/45654
+ statusMessage = $"Error loading user with ID {UserId}";
+ }
+ else
+ {
+
+ var code = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(Code));
+ var result = await UserManager.ConfirmEmailAsync(user, code);
+ statusMessage = result.Succeeded ? "Thank you for confirming your email." : "Error confirming your email.";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ConfirmEmailChange.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ConfirmEmailChange.razor
new file mode 100644
index 000000000000..510fb2d0e93f
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ConfirmEmailChange.razor
@@ -0,0 +1,64 @@
+@page "/Account/ConfirmEmailChange"
+
+@using System.Text
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor
+@inject IdentityRedirectManager RedirectManager
+
+Confirm email change
+
+
Confirm email change
+
+
+
+@code {
+ private string? _message;
+ private ApplicationUser _user = default!;
+
+ [SupplyParameterFromQuery]
+ private string? UserId { get; set; }
+
+ [SupplyParameterFromQuery]
+ private string? Email { get; set; }
+
+ [SupplyParameterFromQuery]
+ private string? Code { get; set; }
+
+ protected override async Task OnInitializedAsync()
+ {
+ if (UserId is null || Email is null || Code is null)
+ {
+ RedirectManager.RedirectToWithStatus(
+ "/Account/Login", "Error: Invalid email change confirmation link.");
+ return;
+ }
+
+ _user = await UserAccessor.GetRequiredUserAsync();
+
+ var code = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(Code));
+ var result = await UserManager.ChangeEmailAsync(_user, Email, code);
+ if (!result.Succeeded)
+ {
+ _message = "Error changing email.";
+ return;
+ }
+
+ // In our UI email and user name are one and the same, so when we update the email
+ // we need to update the user name.
+ var setUserNameResult = await UserManager.SetUserNameAsync(_user, Email);
+ if (!setUserNameResult.Succeeded)
+ {
+ _message = "Error changing user name.";
+ return;
+ }
+
+ await SignInManager.RefreshSignInAsync(_user);
+ _message = "Thank you for confirming your email change.";
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ExternalLogin.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ExternalLogin.razor
new file mode 100644
index 000000000000..51bfa81fc116
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ExternalLogin.razor
@@ -0,0 +1,213 @@
+@page "/Account/ExternalLogin"
+
+@using System.ComponentModel.DataAnnotations
+@using System.Security.Claims
+@using System.Text
+@using System.Text.Encodings.Web
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject SignInManager SignInManager
+@inject UserManager UserManager
+@inject IUserStore UserStore
+@inject IEmailSender EmailSender
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+@inject ILogger Logger
+
+@{
+ var providerDisplayName = _externalLoginInfo.ProviderDisplayName;
+}
+
+Register
+
+
+
Register
+
Associate your @providerDisplayName account.
+
+
+
+ You've successfully authenticated with @providerDisplayName.
+ Please enter an email address for this site below and click the Register button to finish
+ logging in.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ public const string LoginCallbackAction = "LoginCallback";
+
+ private string? _message;
+ private ExternalLoginInfo _externalLoginInfo = default!;
+ private IUserEmailStore _emailStore = default!;
+
+ [SupplyParameterFromQuery]
+ private string? RemoteError { get; set; }
+
+ [CascadingParameter]
+ public HttpContext HttpContext { get; set; } = default!;
+
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = default!;
+
+ [SupplyParameterFromQuery]
+ private string ReturnUrl { get; set; } = default!;
+
+ [SupplyParameterFromQuery]
+ private string? Action { get; set; } = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ Input ??= new();
+ ReturnUrl ??= "/";
+
+ if (RemoteError is not null)
+ {
+ RedirectManager.RedirectToWithStatus("/Account/Login", "Error from external provider: " + RemoteError);
+ return;
+ }
+
+ var externalLoginInfo = await SignInManager.GetExternalLoginInfoAsync();
+ if (externalLoginInfo is null)
+ {
+ RedirectManager.RedirectToWithStatus("/Account/Login", "Error loading external login information.");
+ return;
+ }
+
+ _externalLoginInfo = externalLoginInfo;
+ _emailStore = GetEmailStore();
+
+ if (HttpMethods.IsGet(HttpContext.Request.Method))
+ {
+ if (Action == LoginCallbackAction)
+ {
+ await OnLoginCallbackAsync();
+ return;
+ }
+
+ // We should only reach this page via the login callback, so redirect back to
+ // the login page if we get here some other way.
+ RedirectManager.RedirectTo("/Account/Login");
+ return;
+ }
+ }
+
+ private async Task OnLoginCallbackAsync()
+ {
+ // Sign in the user with this external login provider if the user already has a login.
+ var result = await SignInManager.ExternalLoginSignInAsync(
+ _externalLoginInfo.LoginProvider,
+ _externalLoginInfo.ProviderKey,
+ isPersistent: false,
+ bypassTwoFactor: true);
+ if (result.Succeeded)
+ {
+ Logger.LogInformation(
+ "{Name} logged in with {LoginProvider} provider.",
+ _externalLoginInfo.Principal.Identity?.Name,
+ _externalLoginInfo.LoginProvider);
+ RedirectManager.RedirectTo(ReturnUrl);
+ return;
+ }
+
+ if (result.IsLockedOut)
+ {
+ RedirectManager.RedirectTo("/Account/Lockout");
+ return;
+ }
+
+ // If the user does not have an account, then ask the user to create an account.
+ if (_externalLoginInfo.Principal.HasClaim(c => c.Type == ClaimTypes.Email))
+ {
+ Input.Email = _externalLoginInfo.Principal.FindFirstValue(ClaimTypes.Email);
+ }
+ }
+
+ private async Task OnValidSubmitAsync()
+ {
+ var user = CreateUser();
+
+ await UserStore.SetUserNameAsync(user, Input.Email, CancellationToken.None);
+ await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
+
+ var result = await UserManager.CreateAsync(user);
+ if (result.Succeeded)
+ {
+ result = await UserManager.AddLoginAsync(user, _externalLoginInfo);
+ if (result.Succeeded)
+ {
+ Logger.LogInformation("User created an account using {Name} provider.", _externalLoginInfo.LoginProvider);
+
+ var userId = await UserManager.GetUserIdAsync(user);
+ var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
+ code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
+
+ var callbackUrl = NavigationManager.GetUriWithQueryParameters(
+ $"{NavigationManager.BaseUri}Account/ConfirmEmail",
+ new Dictionary { { "userId", userId }, { "code", code } });
+ await EmailSender.SendEmailAsync(Input.Email!, "Confirm your email",
+ $"Please confirm your account by clicking here.");
+
+ // If account confirmation is required, we need to show the link if we don't have a real email sender
+ if (UserManager.Options.SignIn.RequireConfirmedAccount)
+ {
+ RedirectManager.RedirectTo("/Account/RegisterConfirmation", new() { ["Email"] = Input.Email });
+ return;
+ }
+
+ await SignInManager.SignInAsync(user, isPersistent: false, _externalLoginInfo.LoginProvider);
+ RedirectManager.RedirectTo(ReturnUrl);
+ return;
+ }
+ }
+ else
+ {
+ _message = $"Error: {string.Join(",", result.Errors.Select(error => error.Description))}";
+ }
+ }
+
+ private ApplicationUser CreateUser()
+ {
+ try
+ {
+ return Activator.CreateInstance();
+ }
+ catch
+ {
+ throw new InvalidOperationException($"Can't create an instance of '{nameof(ApplicationUser)}'. " +
+ $"Ensure that '{nameof(ApplicationUser)}' is not an abstract class and has a parameterless constructor");
+ }
+ }
+
+ private IUserEmailStore GetEmailStore()
+ {
+ if (!UserManager.SupportsUserEmail)
+ {
+ throw new NotSupportedException("The default UI requires a user store with email support.");
+ }
+ return (IUserEmailStore)UserStore;
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [EmailAddress]
+ public string? Email { get; set; }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPassword.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPassword.razor
new file mode 100644
index 000000000000..605a676daad5
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPassword.razor
@@ -0,0 +1,74 @@
+@page "/Account/ForgotPassword"
+
+@using System.ComponentModel.DataAnnotations
+@using System.Text
+@using System.Text.Encodings.Web
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+@inject UserManager UserManager
+@inject IEmailSender EmailSender
+
+Forgot your password?
+
+
Forgot your password?
+
Enter your email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = new();
+
+ private async Task OnValidSubmitAsync()
+ {
+ var user = await UserManager.FindByEmailAsync(Input.Email);
+ if (user is null || !(await UserManager.IsEmailConfirmedAsync(user)))
+ {
+ // Don't reveal that the user does not exist or is not confirmed
+ RedirectManager.RedirectTo("/Account/ForgotPasswordConfirmation");
+ return;
+ }
+
+ // For more information on how to enable account confirmation and password reset please
+ // visit https://go.microsoft.com/fwlink/?LinkID=532713
+ var code = await UserManager.GeneratePasswordResetTokenAsync(user);
+ code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
+ var callbackUrl = NavigationManager.GetUriWithQueryParameters(
+ $"{NavigationManager.BaseUri}Account/ResetPassword",
+ new Dictionary { { "code", code } });
+
+ await EmailSender.SendEmailAsync(
+ Input.Email,
+ "Reset Password",
+ $"Please reset your password by clicking here.");
+
+ RedirectManager.RedirectTo("/Account/ForgotPasswordConfirmation");
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [EmailAddress]
+ public string Email { get; set; } = default!;
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPasswordConfirmation.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPasswordConfirmation.razor
new file mode 100644
index 000000000000..38de01d1ec0c
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ForgotPasswordConfirmation.razor
@@ -0,0 +1,8 @@
+@page "/Account/ForgotPasswordConfirmation"
+
+Forgot password confirmation
+
+
Forgot password confirmation
+
+ Please check your email to reset your password.
+
+
+@code {
+ private string? _message;
+ private ApplicationUser _user = default!;
+
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = default!;
+
+ [SupplyParameterFromQuery]
+ private string? ReturnUrl { get; set; }
+
+ [SupplyParameterFromQuery]
+ private bool RememberMe { get; set; }
+
+ protected override async Task OnInitializedAsync()
+ {
+ Input ??= new();
+ ReturnUrl ??= "/";
+
+ var user = await SignInManager.GetTwoFactorAuthenticationUserAsync();
+ if (user is null)
+ {
+ throw new InvalidOperationException($"Unable to load two-factor authentication user.");
+ }
+
+ _user = user;
+ }
+
+ private async Task OnValidSubmitAsync()
+ {
+ var authenticatorCode = Input.TwoFactorCode!.Replace(" ", string.Empty).Replace("-", string.Empty);
+ var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(authenticatorCode, RememberMe, Input.RememberMachine);
+ var userId = await UserManager.GetUserIdAsync(_user);
+
+ if (result.Succeeded)
+ {
+ Logger.LogInformation("User with ID '{UserId}' logged in with 2fa.", _user.Id);
+ RedirectManager.RedirectTo(ReturnUrl ?? "/");
+ }
+ else if (result.IsLockedOut)
+ {
+ Logger.LogWarning("User with ID '{UserId}' account locked out.", _user.Id);
+ RedirectManager.RedirectTo("/Account/Lockout");
+ }
+ else
+ {
+ Logger.LogWarning("Invalid authenticator code entered for user with ID '{UserId}'.", _user.Id);
+ _message = "Error: Invalid authenticator code.";
+ }
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Text)]
+ [Display(Name = "Authenticator code")]
+ public string? TwoFactorCode { get; set; }
+
+ [Display(Name = "Remember this machine")]
+ public bool RememberMachine { get; set; }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/LoginWithRecoveryCode.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/LoginWithRecoveryCode.razor
new file mode 100644
index 000000000000..41d5d3660810
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/LoginWithRecoveryCode.razor
@@ -0,0 +1,94 @@
+@page "/Account/LoginWithRecoveryCode"
+
+@using System.ComponentModel.DataAnnotations
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Mvc
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject SignInManager SignInManager
+@inject UserManager UserManager
+@inject IdentityRedirectManager RedirectManager
+@inject ILogger Logger
+
+Recovery code verification
+
+
Recovery code verification
+
+
+
+ You have requested to log in with a recovery code. This login will not be remembered until you provide
+ an authenticator app code at log in or disable 2FA and log in again.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ private string? _message;
+ private ApplicationUser _user = default!;
+
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = default!;
+
+ [SupplyParameterFromQuery]
+ private string? ReturnUrl { get; set; }
+
+ protected override async Task OnInitializedAsync()
+ {
+ Input ??= new();
+
+ // Ensure the user has gone through the username & password screen first
+ var user = await SignInManager.GetTwoFactorAuthenticationUserAsync();
+ if (user is null)
+ {
+ throw new InvalidOperationException($"Unable to load two-factor authentication user.");
+ }
+
+ _user = user;
+ }
+
+ private async Task OnValidSubmitAsync()
+ {
+ var recoveryCode = Input.RecoveryCode!.Replace(" ", string.Empty);
+
+ var result = await SignInManager.TwoFactorRecoveryCodeSignInAsync(recoveryCode);
+
+ var userId = await UserManager.GetUserIdAsync(_user);
+
+ if (result.Succeeded)
+ {
+ Logger.LogInformation("User with ID '{UserId}' logged in with a recovery code.", _user.Id);
+ RedirectManager.RedirectTo(ReturnUrl ?? "/");
+ }
+ if (result.IsLockedOut)
+ {
+ Logger.LogWarning("User account locked out.");
+ RedirectManager.RedirectTo("/Account/Lockout");
+ }
+ else
+ {
+ Logger.LogWarning("Invalid recovery code entered for user with ID '{UserId}' ", _user.Id);
+ _message = "Error: Invalid recovery code entered.";
+ }
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [DataType(DataType.Text)]
+ [Display(Name = "Recovery Code")]
+ public string? RecoveryCode { get; set; }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/ChangePassword.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/ChangePassword.razor
new file mode 100644
index 000000000000..aabf71983a62
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/ChangePassword.razor
@@ -0,0 +1,97 @@
+@page "/Account/Manage/ChangePassword"
+
+@using System.ComponentModel.DataAnnotations
+@using Microsoft.AspNetCore.Identity
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor
+@inject IdentityRedirectManager RedirectManager
+@inject ILogger Logger
+
+Change password
+
+
Change password
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ private string? _message;
+ private ApplicationUser _user = default!;
+ private bool _hasPassword;
+
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ Input ??= new();
+
+ _user = await UserAccessor.GetRequiredUserAsync();
+ _hasPassword = await UserManager.HasPasswordAsync(_user);
+ if (!_hasPassword)
+ {
+ RedirectManager.RedirectTo("/Account/Manage/SetPassword");
+ return;
+ }
+ }
+
+ private async Task OnValidSubmitAsync()
+ {
+ var changePasswordResult = await UserManager.ChangePasswordAsync(_user, Input.OldPassword!, Input.NewPassword!);
+ if (!changePasswordResult.Succeeded)
+ {
+ _message = $"Error: {string.Join(",", changePasswordResult.Errors.Select(error => error.Description))}";
+ return;
+ }
+
+ await SignInManager.RefreshSignInAsync(_user);
+ Logger.LogInformation("User changed their password successfully.");
+
+ RedirectManager.RedirectToCurrentPageWithStatus("Your password has been changed");
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [DataType(DataType.Password)]
+ [Display(Name = "Current password")]
+ public string? OldPassword { get; set; }
+
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "New password")]
+ public string? NewPassword { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm new password")]
+ [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
+ public string? ConfirmPassword { get; set; }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/DeletePersonalData.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/DeletePersonalData.razor
new file mode 100644
index 000000000000..c3ed9c38635a
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/DeletePersonalData.razor
@@ -0,0 +1,85 @@
+@page "/Account/Manage/DeletePersonalData"
+
+@using System.ComponentModel.DataAnnotations
+@using Microsoft.AspNetCore.Identity
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor
+@inject IdentityRedirectManager RedirectManager
+@inject ILogger Logger
+
+Delete Personal Data
+
+
+
+
Delete Personal Data
+
+
+
+ Deleting this data will permanently remove your account, and this cannot be recovered.
+
+ Disabling 2FA does not change the keys used in authenticator apps. If you wish to change the key
+ used in an authenticator app you should reset your authenticator keys.
+
+
+
+
+
+
+
+@code {
+ private ApplicationUser _user = default!;
+
+ [CascadingParameter]
+ private HttpContext HttpContext { get; set; } = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ _user = await UserAccessor.GetRequiredUserAsync();
+
+ if (HttpMethods.IsGet(HttpContext.Request.Method))
+ {
+ if (!await UserManager.GetTwoFactorEnabledAsync(_user))
+ {
+ throw new InvalidOperationException($"Cannot disable 2FA for user as it's not currently enabled.");
+ }
+ return;
+ }
+ }
+
+ private async Task OnSubmitAsync()
+ {
+ var disable2faResult = await UserManager.SetTwoFactorEnabledAsync(_user, false);
+ if (!disable2faResult.Succeeded)
+ {
+ throw new InvalidOperationException($"Unexpected error occurred disabling 2FA.");
+ }
+
+ var userId = await UserManager.GetUserIdAsync(_user);
+ Logger.LogInformation("User with ID '{UserId}' has disabled 2fa.", userId);
+ RedirectManager.RedirectToWithStatus(
+ "/Account/Manage/TwoFactorAuthentication",
+ "2fa has been disabled. You can reenable 2fa when you setup an authenticator app");
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Email.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Email.razor
new file mode 100644
index 000000000000..c629d0a8ee8e
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Email.razor
@@ -0,0 +1,123 @@
+@page "/Account/Manage/Email"
+
+@using System.ComponentModel.DataAnnotations
+@using System.Text
+@using System.Text.Encodings.Web
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject UserAccessor UserAccessor
+@inject IEmailSender EmailSender
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+
+Manage email
+
+
+ Once you have scanned the QR code or input the key above, your two factor authentication app will provide you
+ with a unique code. Enter the code in the confirmation box below.
+
+ If you lose your device and don't have the recovery codes you will lose access to your account.
+
+
+ Generating new recovery codes does not change the keys used in authenticator apps. If you wish to change the key
+ used in an authenticator app you should reset your authenticator keys.
+
+
+
+
+
+}
+
+@code {
+ private ApplicationUser _user = default!;
+
+ private IEnumerable? _recoveryCodes;
+ private string? _message;
+
+ protected override async Task OnInitializedAsync()
+ {
+ _user = await UserAccessor.GetRequiredUserAsync();
+
+ var isTwoFactorEnabled = await UserManager.GetTwoFactorEnabledAsync(_user);
+ if (!isTwoFactorEnabled)
+ {
+ throw new InvalidOperationException($"Cannot generate recovery codes for user because they do not have 2FA enabled.");
+ }
+ }
+
+ private async Task OnSubmitAsync()
+ {
+ var userId = await UserManager.GetUserIdAsync(_user);
+ _recoveryCodes = await UserManager.GenerateNewTwoFactorRecoveryCodesAsync(_user, 10);
+ _message = "You have generated new recovery codes.";
+
+ Logger.LogInformation("User with ID '{UserId}' has generated new 2FA recovery codes.", userId);
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Index.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Index.razor
new file mode 100644
index 000000000000..7e59b2732987
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/Index.razor
@@ -0,0 +1,80 @@
+@page "/Account/Manage"
+
+@using System.ComponentModel.DataAnnotations;
+@using System.Security.Claims
+@using Microsoft.AspNetCore.Identity;
+@using BlazorWeb_CSharp.Data;
+@using BlazorWeb_CSharp.Identity
+
+@inject AuthenticationStateProvider AuthenticationStateProvider
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor;
+@inject IdentityRedirectManager RedirectManager
+
+Profile
+
+
+
+ If you reset your authenticator key your authenticator app will not work until you reconfigure it.
+
+
+ This process disables 2FA until you verify your authenticator app.
+ If you do not complete your authenticator app configuration you may lose access to your account.
+
+
+
+
+
+
+@code {
+ private ApplicationUser _user = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ _user = await UserAccessor.GetRequiredUserAsync();
+ }
+
+ private async Task OnSubmitAsync()
+ {
+ await UserManager.SetTwoFactorEnabledAsync(_user, false);
+ await UserManager.ResetAuthenticatorKeyAsync(_user);
+ var userId = await UserManager.GetUserIdAsync(_user);
+ Logger.LogInformation("User with ID '{UserId}' has reset their authentication app key.", _user.Id);
+
+ await SignInManager.RefreshSignInAsync(_user);
+
+ RedirectManager.RedirectToWithStatus(
+ "/Account/Manage/EnableAuthenticator",
+ "Your authenticator app key has been reset, you will need to configure your authenticator app using the new key.");
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/SetPassword.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/SetPassword.razor
new file mode 100644
index 000000000000..5f1aff4403ad
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/SetPassword.razor
@@ -0,0 +1,88 @@
+@page "/Account/Manage/SetPassword"
+
+@using System.ComponentModel.DataAnnotations
+@using Microsoft.AspNetCore.Identity
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor
+@inject IdentityRedirectManager RedirectManager
+
+Set password
+
+
Set your password
+
+
+ You do not have a local username/password for this site. Add a local
+ account so you can log in without an external login.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ private string? _message;
+ private ApplicationUser _user = default!;
+
+ [SupplyParameterFromForm]
+ private InputModel Input { get; set; } = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ Input ??= new();
+
+ _user = await UserAccessor.GetRequiredUserAsync();
+
+ var hasPassword = await UserManager.HasPasswordAsync(_user);
+ if (hasPassword)
+ {
+ RedirectManager.RedirectTo("/Account/Manage/ChangePassword");
+ return;
+ }
+ }
+
+ private async Task OnValidSubmitAsync()
+ {
+ var addPasswordResult = await UserManager.AddPasswordAsync(_user, Input.NewPassword!);
+ if (!addPasswordResult.Succeeded)
+ {
+ _message = $"Error: {string.Join(",", addPasswordResult.Errors.Select(error => error.Description))}";
+ return;
+ }
+
+ await SignInManager.RefreshSignInAsync(_user);
+ RedirectManager.RedirectToCurrentPageWithStatus("Your password has been set.");
+ }
+
+ private sealed class InputModel
+ {
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "New password")]
+ public string? NewPassword { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm new password")]
+ [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
+ public string? ConfirmPassword { get; set; }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/TwoFactorAuthentication.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/TwoFactorAuthentication.razor
new file mode 100644
index 000000000000..fbb2f32eddbd
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/TwoFactorAuthentication.razor
@@ -0,0 +1,101 @@
+@page "/Account/Manage/TwoFactorAuthentication"
+
+@using Microsoft.AspNetCore.Http.Features
+@using Microsoft.AspNetCore.Identity
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject SignInManager SignInManager
+@inject UserAccessor UserAccessor
+@inject IdentityRedirectManager RedirectManager
+
+Two-factor authentication (2FA)
+
+
+
Two-factor authentication (2FA)
+@if (_consentFeature?.CanTrack ?? true)
+{
+ if (_is2faEnabled)
+ {
+ if (_recoveryCodesLeft == 0)
+ {
+
+ Privacy and cookie policy have not been accepted.
+
You must accept the policy before you can enable two factor authentication.
+
+}
+
+@code {
+ private ApplicationUser? _user;
+ private ITrackingConsentFeature? _consentFeature;
+ private bool _hasAuthenticator;
+ private int _recoveryCodesLeft;
+ private bool _is2faEnabled;
+ private bool _isMachineRemembered;
+
+ [CascadingParameter]
+ private HttpContext HttpContext { get; set; } = default!;
+
+ protected override async Task OnInitializedAsync()
+ {
+ _user = await UserAccessor.GetRequiredUserAsync();
+ _consentFeature = HttpContext.Features.Get();
+ _hasAuthenticator = await UserManager.GetAuthenticatorKeyAsync(_user) is not null;
+ _is2faEnabled = await UserManager.GetTwoFactorEnabledAsync(_user);
+ _isMachineRemembered = await SignInManager.IsTwoFactorClientRememberedAsync(_user);
+ _recoveryCodesLeft = await UserManager.CountRecoveryCodesAsync(_user);
+ }
+
+ private async Task OnSubmitForgetBrowserAsync()
+ {
+ await SignInManager.ForgetTwoFactorClientAsync();
+
+ RedirectManager.RedirectToCurrentPageWithStatus(
+ "The current browser has been forgotten. When you login again from this browser you will be prompted for your 2fa code.");
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/_Imports.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/_Imports.razor
new file mode 100644
index 000000000000..d605aec1f504
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Manage/_Imports.razor
@@ -0,0 +1,2 @@
+@layout BlazorWeb_CSharp.Components.Layout.ManageLayout
+@attribute [Microsoft.AspNetCore.Authorization.Authorize]
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Register.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Register.razor
new file mode 100644
index 000000000000..822a95b69460
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/Register.razor
@@ -0,0 +1,176 @@
+@page "/Account/Register"
+
+@using System.ComponentModel.DataAnnotations
+@using System.Text
+@using System.Text.Encodings.Web
+@using Microsoft.AspNetCore.Authentication
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject IUserStore UserStore
+@inject SignInManager SignInManager
+@inject ILogger Logger
+@inject IEmailSender EmailSender
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+
+Register
+
+
Register
+
+
+
+
+
+
+
Create a new account.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Use another service to register.
+
+
+
+
+
+
+@code {
+ [SupplyParameterFromForm]
+ public InputModel Input { get; set; } = default!;
+
+ ///
+ /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ [SupplyParameterFromQuery]
+ public string ReturnUrl { get; set; } = "";
+
+ ///
+ /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ public class InputModel
+ {
+ ///
+ /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ [Required]
+ [EmailAddress]
+ [Display(Name = "Email")]
+ public string Email { get; set; } = null!;
+
+ ///
+ /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "Password")]
+ public string Password { get; set; } = null!;
+
+ ///
+ /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm password")]
+ [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
+ public string ConfirmPassword { get; set; } = null!;
+ }
+
+ IEnumerable? identityErrors;
+ string? Message => identityErrors is null ? null : "Error: " + string.Join(", ", identityErrors.Select(error => error.Description));
+
+ protected override void OnInitialized()
+ {
+ Input ??= new();
+ }
+
+ public async Task RegisterUser(EditContext editContext)
+ {
+ var user = CreateUser();
+
+ await UserStore.SetUserNameAsync(user, Input.Email, CancellationToken.None);
+ var emailStore = GetEmailStore();
+ await emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
+ var result = await UserManager.CreateAsync(user, Input.Password);
+
+ if (result.Succeeded)
+ {
+ Logger.LogInformation("User created a new account with password.");
+
+ var userId = await UserManager.GetUserIdAsync(user);
+ var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
+ code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
+ var callbackUrl = NavigationManager.GetUriWithQueryParameters(
+ NavigationManager.ToAbsoluteUri("/Account/ConfirmEmail").AbsoluteUri,
+ new Dictionary { { "userId", userId }, { "code", code }, { "returnUrl", ReturnUrl } });
+
+ await EmailSender.SendEmailAsync(Input.Email, "Confirm your email",
+ $"Please confirm your account by clicking here.");
+
+ if (UserManager.Options.SignIn.RequireConfirmedAccount)
+ {
+ RedirectManager.RedirectTo(
+ "/Account/RegisterConfirmation",
+ new() { ["Email"] = Input.Email, ["ReturnUrl"] = ReturnUrl });
+ }
+ else
+ {
+ await SignInManager.SignInAsync(user, isPersistent: false);
+ RedirectManager.RedirectTo(ReturnUrl);
+ }
+ }
+ else
+ {
+ identityErrors = result.Errors;
+ }
+ }
+
+ private ApplicationUser CreateUser()
+ {
+ try
+ {
+ return Activator.CreateInstance();
+ }
+ catch
+ {
+ throw new InvalidOperationException($"Can't create an instance of '{nameof(ApplicationUser)}'. " +
+ $"Ensure that '{nameof(ApplicationUser)}' is not an abstract class and has a parameterless constructor.");
+ }
+ }
+
+ private IUserEmailStore GetEmailStore()
+ {
+ if (!UserManager.SupportsUserEmail)
+ {
+ throw new NotSupportedException("The default UI requires a user store with email support.");
+ }
+ return (IUserEmailStore) UserStore;
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/RegisterConfirmation.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/RegisterConfirmation.razor
new file mode 100644
index 000000000000..5f54beb59e9a
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/RegisterConfirmation.razor
@@ -0,0 +1,67 @@
+@page "/Account/RegisterConfirmation"
+
+@using System.Text
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject IEmailSender EmailSender
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+
+Register confirmation
+
+
Register confirmation
+
+
+
+@if (emailConfirmationLink is not null)
+{
+
+ This app does not currently have a real email sender registered, see these docs for how to configure a real email sender.
+ Normally this would be emailed: Click here to confirm your account
+
+}
+else
+{
+
Please check your email to confirm your account.
+}
+
+@code {
+ string? emailConfirmationLink;
+ string? statusMessage;
+
+ [SupplyParameterFromQuery] public string? Email { get; set; }
+ [SupplyParameterFromQuery] public string ReturnUrl { get; set; } = "/";
+
+ protected override async Task OnInitializedAsync()
+ {
+ if (Email == null)
+ {
+ RedirectManager.RedirectTo("/");
+ }
+ else
+ {
+
+ var user = await UserManager.FindByEmailAsync(Email);
+ if (user == null)
+ {
+ // Need a way to trigger a 404 from Blazor: https://github.com/dotnet/aspnetcore/issues/45654
+ statusMessage = $"Error finding user for unspecified email";
+ }
+ else if (EmailSender is NoOpEmailSender)
+ {
+ // Once you add a real email sender, you should remove this code that lets you confirm the account
+ var userId = await UserManager.GetUserIdAsync(user);
+ var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
+ code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
+ emailConfirmationLink = NavigationManager.GetUriWithQueryParameters(
+ NavigationManager.ToAbsoluteUri("/Account/ConfirmEmail").AbsoluteUri,
+ new Dictionary { { "userId", userId }, { "code", code }, { "returnUrl", ReturnUrl } });
+ }
+ }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ResendEmailConfirmation.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ResendEmailConfirmation.razor
new file mode 100644
index 000000000000..fa5f9d1dbafe
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Pages/Account/ResendEmailConfirmation.razor
@@ -0,0 +1,78 @@
+@page "/Account/ResendEmailConfirmation"
+
+@using System.ComponentModel.DataAnnotations
+@using System.Text
+@using System.Text.Encodings.Web
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.AspNetCore.Identity.UI.Services
+@using Microsoft.AspNetCore.WebUtilities
+@using BlazorWeb_CSharp.Data
+@using BlazorWeb_CSharp.Identity
+
+@inject UserManager UserManager
+@inject IEmailSender EmailSender
+@inject NavigationManager NavigationManager
+@inject IdentityRedirectManager RedirectManager
+
+Resend email confirmation
+
+