If you have purchased, thank you so much for being our loyal customer.
You're awesome!😍
You are entitled to all the terms you agreed upon your purchase and we will help you get the most
out of your products.
This documentation is to help you with your product customization. Please go through the documentation carefully to understand how this product is made and how to edit this properly.
If you need assistance and help, we can provide paid help. Please check our website for service packages.
Be careful when editing the producr. If not edited properly, the design layout may break completely.
No support is provided for faulty customization which you may introduce due to poor or improper editing.
We used Bootstrap 5 and ASP.NET to development this product. You need Visual Studio IDE 2022 (the latest version) and install the ASP.NET Web Application development workload in order to edit and customize the project. If you have these already installed, then you are ready for excitement!😍
super
123
You can create other new accounts and manage them, see how the System handles Roles and Authorization, etc.
ClientId
and ClientSecret
.
ClientId
and ClientSecret
.ClientId
and ClientSecret
from each provider.appsettings.json
file then add your authentication keys as follows:"OAuth": { "Google": { "ClientId": "your-client-id-comes-in-here", "ClientSecret": "your-client-secret-comes-in-here" }, "Microsoft": { "ClientId": "your-client-id-comes-in-here", "ClientSecret": "your-client-secret-comes-in-here" }
If you have already downloaded Visual Studio IDE 2022 or higher, you may choose to skip this stage. You can check the supported .NET version for this product from the website. We recommend you to install the ASP.NET Web Application development workflow when installing Visual Studio IDE.
We have used Entity Framework Core as the Object Relational Mapper (ORM) for the default project database MSSQL Server. You can use Entity Framework Core for any database of your choice. Learn more about Entity Framework Core from their documentation found here.
The default database name for the project is found in the appsettings.json
file. See the exmaple below:
MSSQLServerConnection": "Server=(localdb)\\mssqllocaldb;Database=the-database-name-comes-here;Trusted_Connection=True;MultipleActiveResultSets=true
Creating and updating the Database, using Entity Framework Core, is simply and straight-forward. Please follow these steps:
In your project files, you will see a new folder/directory named Migrations which contains all your migration history and what was created including a snapshot of the migration.
Done! You can now use your database.
protected override void OnModelCreating(ModelBuilder builder) { // seeding default data. Go to definition and edit/customize builder.Seed(); // base call base.OnModelCreating(builder); }
Areas/Identity/Pages/Account/Manage
ChangePassword.cshtml.cs
ChangeUsername.cshtml.cs
DeletePersonalData.cshtml.cs
Email.cshtml.cs
EnableAuthenticator.cshtml.cs
PersonalInformation.cshtml.cs
RemoveRoleMember.cshtml.cs
.cshtml.cs
files located above:
// remove this code when you buy the product. // It prevents demo users from deleting a Super Administrator if (user.Id == SuperAdministratorId.Get) { // code logic... }
We use Entity Framework Core (EFCore) to manage the underlining database. Our implementation supports dependancy injection for better performance therefore we advice that you follow the exmaple below when interacting with the database:
public class AnyClass(IDbContextFactory< AppDbContext > dbContextFactory)
- Make a readonly field like this:
private readonly IDbContextFactory< AppDbContext > dbContextFactory = dbContextFactory;- In any method/function, create a context like this:
using var dbContext = await dbContextFactory.CreateDbContextAsync();
- Create/Add an entity:
await dbContext.AddAsync(Entity);
await dbContext.SaveChangesAsync(); // do not forget to always save changes
- Create/Add many entities:
await dbContext.AddRangeAsync(EntityArray);
await dbContext.SaveChangesAsync(); // do not forget to always save changes
- Read entity/entities:
var user = await dbContext.Users.FirstOrDefaultAsync(x => x.Id == "12345");
var users = await dbContext.Users.AsNoTracking().ToListAsync();
var usersWith2FaEnabled = await dbContext.Users.AsNoTracking().Where(x=> x.TwoFactorEnabled).ToListAsync();
var usersFromNewYork = await dbContext.Users.AsNoTracking().Where(x=> x.City == "New York").ToListAsync();
- Update an entity:
dbContext.Update(Entity);
await dbContext.SaveChangesAsync();
// do not forget to always save changes- Update many entities:
dbContext.UpdateRange(Entity);
await dbContext.SaveChangesAsync();
// do not forget to always save changes- Delete an entity:
dbContext.Remove(Entity);
await dbContext.SaveChangesAsync(); // do not forget to always save changes
- Delete many entities:
dbContext.RemoveRange(Entity);
await dbContext.SaveChangesAsync(); // do not forget to always save changes
Extending the IdentityUser is simple and straight-forward. We have provided a class to help you ass your own custom properties and user features. Follow the steps below:
DataModels
> ApplicationUser
> ApplicationUserModel
ApplicationUserModel
is the class that extends the IdentityUser
class.SCSS
files
Locate the wwwroot
folder and reveal all the scss files.
components/scss/floating-theme-switcher.scss
components/scss/password-meter.scss
css/authentication/authentication.scss
custom-bootstrap/customBootstrap.scss
css/general.scss
Locate the wwwroot
folder and reveal all the javascript files.
wwwroot/js/...
Locate the wwwroot
folder and open the js
folder.
wwwroot/js/...
, therefore add your files in here.
Locate the wwwroot
folder and open the fonts
folder.
wwwroot/fonts/...
, therefore add your fonts in here.
Locate the wwwroot
folder and open the custom-bootstrap
> customBootstrap.scss
folder.
Locate the wwwroot
folder and open the countries-json
folder.
Locate the wwwroot
folder and open the countries-flags
folder.
We have integrated Postmark API as the email sender service. You are free to implement your own service. To learn more about Postmark, please visit their website.
HelperClasses
>
EmailManager
>
Sender
IEmailSenderService.cs
: the interface implemented by the class that sends an email message.EmailSender.cs
: the class that implements IEmailSenderService.cs
and sends an email message.EmailSenderResult.cs
: the response after attempting to send an email.EmailSender.cs
class takes the Postmark FromEmail
and Postmark ClientId
which will be used to authenticate your postmark account and sends an email on successful authentication.
Postmark ClientId
and Postmark FromEmail
are taken from the appsettings.json
file.
"PostMark": { "FromEmail": "your-from-email-whose-domain-is-authenticated-in-postmark", "ClientId": "postmark-client-id" },
FromEmail
and ClientId
, then you are ready to send emails.
You can learn more about how to get these values from Postmark Developer Documentation.
We use Abstract API for Email Validation. You are free to implement your own Email Validation Service.
HelperClasses
>
API
> EmailValidation
> AbstractAPI
.
IAbstractEmailService.cs
: the interface that will be implemented by the class that will validate an email address.
AbstractEmailService.cs
: the class that implements the IAbstractEmailService.cs
class and actually validates a given email address.
AbstractEmailResponse.cs
: the validation response which contains vital information about the validation process.
appsettings.json
file like below:
"AbstractApi": { "Email": { "ApiKey": "your-abstract-api-key", "BaseUrl": "https://emailvalidation.abstractapi.com/v1/" // the base URL (do not change) }
Email Validation
for new sign-ups, the Abstract API will kick in
and go to work, in real-time.
You can add your solution logo to wwwroot
, in an img
folder and use it across your solution.
If the img
folder does not exist, you can create a new one.
HelperClasses
>
SystemName
Dependancy Injection
to get the name across the system. Inject the
ISystemName.cs
in any class then call the GetName
property. It is readonly
and returns a name as a string
.
MSSQL Server
MySQL
PostgreSQL
SQLite
MongoDb
AWS
Azure
Google Cloud SQL
Oracle Database
etc...
[Authorize(Roles = "Administrator")] public class AdministrationController : Controller { public IActionResult Index() => Content("Administrator"); }
Roles
PermissionsStore.cs
: the class that stores all the permissions.
RolePermissions.cs
: this class is intentionally left empty to help you add your custom code and then implement it. if you wish.
SystemRoles.cs
: the class with default system roles (27)
35
different and unique account events, all in realtime.
The logging is deactivated by defauult and will be turned ON by the Admin or Super Admin. They have the choice
of selectively turning ON activities to monitor, ie. they can choose to turn on Failed Password
events and ignore
Account Lockout
events.
HelperClasses
>
AccountActivityLogging
2 classes:
IAccountActivityLogger.cs
: the interface to be implemented by the logger class.
AccountActivityLogger.cs
: the class that logs all activities.
Passwordless Authentication
, etc.
TO learn more please read below:
HelperClasses
> Tokens
HTML Formatted
. You can customize the templates by providing your own
HTML code
. To reveal the templates, please read on:
Dependancy Injection
to call an HTML Template
for sending as an email message
in an email body.
HelperClasses
> EmailManager
> Templates
2 classes
:
IEmailTemplate.cs
: the class that will be implemented by the class that creates a template.
EmailTemplate.cs
: the class that creates an HTML template
and returns it to the caller.
IEmailTemplate.cs
class and call for a template to be created and returned.
var untrustedDeviceEmailAlertTemplate = await emailTemplate.NewDeviceSignedInAsync(user, untrustedNewSigninEvent, trustDeviceUrlCallbackUrl);
await emailTemplate.NewDeviceSignedInAsync...
: calling for a NewDeviceSignin
template to be created.user
: the user whose account is in question.untrustedNewSigninEvent
: the type of event. You can learn more about these events by going to the Definition
of the variable.trustDeviceUrlCallbackUrl
: the call-back url embedded in an email upon which the user could take action such as Trust Device.untrustedDeviceEmailAlertTemplate
: the returned HTML
template as a string
.Please remember you have purchased a very affordable product and you have not paid for a full-time development agency. Occasionally we will help with small tweaks, but these requests will be put on a lower priority due to their nature unless you are eligible for Priority Support. Support is provided on the terms you agreed on when you purchased your product. Please be patient, polite and respectful.
Support for products includes: