github repo github stars

Settings

Other configurations available in the Bit TodoTemplate are as follows:

Authentication policies

Bit TodoTemplate provides authentication with and implements the SignUp and SignIn user interfaces. You can change the default settings of the Identity Settings according to your needs; These settings are in the appsettings.json file in the Api project.
"IdentitySettings": {
    "PasswordRequireDigit": "false",
    "PasswordRequiredLength": "6",
    "PasswordRequireNonAlphanumeric": "false",
    "PasswordRequireUppercase": "false",
    "PasswordRequireLowercase": "false",
    "RequireUniqueEmail": "true",
    "ConfirmationEmailResendDelay": "0.00:02:00", //Format: D.HH:mm:nn
    "ResetPasswordEmailResendDelay": "0.00:02:00" //Format: D.HH:mm:nn
}

JWT settings

Bit TodoTemplate uses JWT to provide token-based authentication and you can change these settings. You can find these settings in the appsettings.json file in the Api project.
"JwtSettings": {
    "IdentityCertificatePassword": "P@ssw0rdP@ssw0rd",
    "Issuer": "TodoTemplate",
    "Audience": "TodoTemplate",
    "NotBeforeMinutes": "0",
    "ExpirationMinutes": "1440"
}
Note: IdentityCertificatePassword referring to the password of the IdentityCertificate.pfx file in the Api 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.
> $cert = New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -Subject "IdentityServerCN" -Provider "Microsoft Strong Cryptographic Provider" -HashAlgorithm "SHA512" -NotAfter (Get-Date).AddYears(5)
> Export-PfxCertificate -cert ('Cert:\LocalMachine\My\' + $cert.thumbprint) -FilePath PATH_TO_YOUR_IdentityServerCertificate.pfx -Password (ConvertTo-SecureString -String "YOUR_PASSWORD" -Force -AsPlainText)

Email settings

Bit TodoTemplate uses FluentEmail to send emails. You can change the SMTP provider settings in the appsettings.json file in the Api project.
"EmailSettings": {
    "Host": "LocalFolder", // Local folder means storing emails in bin\sent-emails folder. (Recommended for testing purposes only)
    "Port": "25",
    "DefaulFromEmail": "info@todo.com",
    "DefaultFromName": "Todo",
    "UserName": null,
    "Password": null
}
Note: You can find email templates used for email confirmation and reset password in the Resources directory of the Api project.

User profile image setting

Bit TodoTemplate saves user profile image in Attachments\Profiles directory of the Api project as default, you can change this path as you need from the appsettings.json file in the Api project.
"UserProfileImagePath": "./Attachments/Profiles/"

Health check settings

Bit TodoTemplate supports 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 Api project.
"HealthCheckSettings": {
    "EnableHealthChecks": true
}
Note: You can find Health Checks dashboard from https://localhost:5001/healthchecks-ui by default.