ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. You can find additional information in the ASP.NET Core Documentation.
<!-- HTML Meta Tags -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="Sinan Özçelik">
<meta name="publisher" content="VS 2023">
<!-- Web Site Title -->
<title>Simple Asp .Net Core Identity Template</title>
<!-- Meta Open Graph -->
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Homepage" />
<meta property="og:url" content="Simple Asp .Net Core Identity Template" />
<meta property="og:site_name" content="Simple Asp .Net Core Identity Template" />
- CRUD Operations
- Migration Operations
- User Authentication
- Register / Login Operations
- Forgot Password
- Roles Operations
- SMTP E-Mail Sender
-
Check the database connection on the appsetting.json file. Customize the database connection path here according to your own computer. By default the database name is PortfolioDb. You can enter SMTP settings from your own e-mail service.
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "ConnectionStrings": { "DefaultConnection": "Data Source=localhost\\SQLEXPRESS;Initial Catalog=IdentityDemoDb;Integrated Security=True; TrustServerCertificate=True; MultipleActiveResultSets=true" }, "EmailSender": { "Host": "mail.alanadiniz.com", "Port": 587, "EnableSSL": false, "Username": "username", "Password": "password" }, "AllowedHosts": "*" }
-
Type the add-migration command via the Package Manager Console.
add-migration DbCreateFirst
-
Type the update-database command via the Package Manager Console.
update-database
-
You can use the information below to enter the admin panel. You can use the /Users/Index address path for the admin panel.
// --- Identity User Information --- // private const string adminUser = "sinanozcelik"; private const string adminPassword = "Sinan123."; private const string adminEmailAddress = "info@sinanozcelik.com"; // Add new user await userManager.CreateAsync(user, adminPassword); // Add "admin" role to new user await userManager.AddToRoleAsync(user, "admin");
You can reach out to me using the following contact details:
I'm always open to development and collaboration. Feel free to reach out to me!