Settings
Other configurations available in the Bit AdminPanel are as follows:
Authentication policies
Bit AdminPanel 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 AdminPanel 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": "[email protected]@ssw0rd",
"Issuer": "AdminPanel",
"Audience": "AdminPanel",
"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 AdminPanel 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": "[email protected]",
"DefaultFromName": "Admin",
"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 AdminPanel saves 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 Api project.
"UserProfileImagePath": "Attachments/Profiles/"
Health check settings
Bit AdminPanel 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.