diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Extensions/IServiceCollectionExtensions.cs index 77e6da9624..419d9d1737 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Extensions/IServiceCollectionExtensions.cs @@ -48,9 +48,9 @@ public static void AddIdentity(this IServiceCollection services, IConfiguration var certificate = new X509Certificate2(certificatePath, appSettings.IdentitySettings.IdentityCertificatePassword, OperatingSystem.IsWindows() ? X509KeyStorageFlags.EphemeralKeySet : X509KeyStorageFlags.DefaultKeySet); bool isBoilerplateTestCertificate = certificate.Thumbprint is "55140A8C935AB5202949071E5781E6946CD60606"; // The default test certificate is still in use - if (hostEnv.IsDevelopment() is false) + if (isBoilerplateTestCertificate && hostEnv.IsDevelopment() is false) { - throw new InvalidOperationException(@"The default test certificate is still in use. Please replace it with a new one by running the 'dotnet dev-certs https --export-path IdentityCertificate.pfx --password P@ssw0rdP@ssw0rd' command in the server project's folder."); + throw new InvalidOperationException(@"The default test certificate is still in use. Please replace it with a new one by running the 'dotnet dev-certs https --export-path IdentityCertificate.pfx --password P@ssw0rdP@ssw0rd' command (or your preferred method for generating PFX files) in the server project's folder."); } services.AddDataProtection() diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor index 839c83c662..aa21d0c804 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor @@ -38,9 +38,11 @@ }
Note: IdentityCertificatePassword referring to the password of the - IdentityCertificate.pfx file in the Server project that used as certificate file - for store the public key and etc for validating incoming JWT tokens. - To create PFX file run the following commands in PowerShell with the desired password and file path for your pfx file. + IdentityCertificate.pfx file in the Server project. + To store the public key and other necessary information for validating incoming JWT tokens, a PFX file is employed. + The same PFX file is utilized to empower the ASP.NET Core Data Protection API. + Various methods exist for creating a PFX file. You may choose to follow your preferred approach for generating PFX files. + Alternatively, you can execute the following command, specifying the desired password and path for your PFX file.
dotnet dev-certs https --export-path IdentityCertificate.pfx --password P@ssw0rdP@ssw0rd
Note: Replace P@ssw0rdP@ssw0rd with strong password and use that as IdentityCertificatePassword's value in appsettings.json