Settings


Other configurations available in the bit project templates are as follows:

Identity settings
bit project templates uses ASP.NET Core Identity + bearer authentication and you can change their settings. You can find these settings in the appsettings.json file in the Server project.
"IdentitySettings": {
    "Issuer": "Boilerplate",
    "Audience": "Boilerplate",
    "IdentityCertificatePassword": "P@ssw0rdP@ssw0rd", // It can also be configured using: dotnet user-secrets set "AppSettings:IdentitySettings:IdentityCertificatePassword" "P@ssw0rdP@ssw0rd"
    "BearerTokenExpiration": "0.01:00:00", // Format: D.HH:mm:ss
    "RefreshTokenExpiration": "14.00:00:00", // Format: D.HH:mm:ss
    "PasswordRequireDigit": "false",
    "PasswordRequiredLength": "6",
    "PasswordRequireNonAlphanumeric": "false",
    "PasswordRequireUppercase": "false",
    "PasswordRequireLowercase": "false",
    "RequireUniqueEmail": "true",
    "ConfirmationEmailResendDelay": "0.00:02:00", // Format: D.HH:mm:ss
    "ResetPasswordEmailResendDelay": "0.00:02:00" // Format: D.HH:mm:ss
}
Note: IdentityCertificatePassword referring to the password of the 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
Email settings
bit project templates use FluentEmail to send emails. You can change the SMTP provider settings in the appsettings.json file in the Server project.
In dev environment, bit saves the sent emails as a .eml file in the src/Boilerplate.Server/bin/Debug/net8.0/sent-emails path, and developers can easily view them in any eml viewer.
You can also use any test smtp server such as ethereal.email or any production ready smtp server such as SendGrid
"EmailSettings": {
    "Host": "smtp.ethereal.email",
    "Port": "587",
    "DefaultFromEmail": "[email protected]",
    "DefaultFromName": "Alva Schiller",
    "UserName": "[email protected]",
    "Password": "4PyGY8cDQ8mvu6h7qB"
}
Note: You can find email templates used for email confirmation and reset password in the Components directory of the Server project.
User profile image settings
bit project templates save user profile image in Attachments\Profiles directory of Environment.SpecialFolder.ApplicationData as default, you can change this path as you need from the appsettings.json file in the Server project.
"UserProfileImagesDir": "Attachments/Profiles/"
Health check settings
bit project templates support Health Checks for reporting the health of app infrastructure components. Health checks APIs are exposed as an HTTP endpoint. You can change the settings of this feature in the appsettings.json file in the Server project.
"HealthCheckSettings": {
    "EnableHealthChecks": true
}
Note: You can find Health Checks dashboard from http://localhost:5030/healthchecks-ui by default.