IdentiPoint 1.0.7
dotnet add package IdentiPoint --version 1.0.7
NuGet\Install-Package IdentiPoint -Version 1.0.7
<PackageReference Include="IdentiPoint" Version="1.0.7" />
<PackageVersion Include="IdentiPoint" Version="1.0.7" />
<PackageReference Include="IdentiPoint" />
paket add IdentiPoint --version 1.0.7
#r "nuget: IdentiPoint, 1.0.7"
#:package IdentiPoint@1.0.7
#addin nuget:?package=IdentiPoint&version=1.0.7
#tool nuget:?package=IdentiPoint&version=1.0.7
🧩 IdentiPoint — Lightweight Identity & Authentication Library for .NET
A lightweight, single-file Mini Identity Server designed for .NET applications.
Provides user registration, login, JWT-based authentication, and refresh tokens — without the complexity of ASP.NET Core Identity.
🚀 Features
- Simple and minimal identity management
- Secure PBKDF2 password hashing
- JWT access and refresh token generation
- EF Core support (SQL Server, SQLite, or InMemory)
- Easily extendable for your own entities (e.g., profiles, audit logs)
🆚 MiniIdentity vs ASP.NET Core Identity
MiniIdentity focuses on simplicity and API-first authentication, while ASP.NET Core Identity is a full membership framework.
| Feature | MiniIdentity | ASP.NET Core Identity |
|---|---|---|
| Setup complexity | Minimal | High |
| Designed for APIs | ✅ Yes | ⚠️ Indirect |
| JWT support | Built-in | Requires configuration |
| Database schema | Simple | Complex |
| Extensibility | Native EF Core | Framework-dependent |
| Learning curve | Low | High |
| Dependencies | Lightweight | Heavy |
| Full control over auth flow | ✅ Yes | ⚠️ Partial |
| Built-in UI system | ❌ No | ✅ Yes |
| External providers (Google, etc.) | ❌ No | ✅ Yes |
⚙️ Installation
Add Entity Framework Core and SQL Server provider:
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer
📁 Folder Setup Example
/YourProject
├── Controllers/
│ ├── AuthController.cs
│ └── ProfileController.cs
├── Data/
│ └── CustomIdentityDbContext.cs
├── Program.cs
├── appsettings.json
└── README.md
🏗️ Program.cs (SQL Server Setup)
using IdentiPoint;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
var builder = WebApplication.CreateBuilder(args);
// ✅ Configure SQL Server Database
builder.Services.AddDbContext<MiniIdentityDbContext>(opt =>
opt.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
// ✅ Register MiniIdentity
builder.Services.AddMiniIdentity(options =>
{
options.JwtSigningKey = "YourStrongSecretKeyHere_AtLeast32Chars"; // Must be at least 32 chars
options.JwtIssuer = "IdentiPoint";
options.JwtAudience = "IdentiPointClients";
});
// ✅ Configure JWT Authentication
var jwtKey = Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Secret"] ?? "YourStrongSecretKeyHere_AtLeast32Chars");
builder.Services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
})
.AddJwtBearer(options =>
{
options.RequireHttpsMetadata = false;
options.SaveToken = true;
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuerSigningKey = true,
IssuerSigningKey = new SymmetricSecurityKey(jwtKey),
ValidateIssuer = true,
ValidateAudience = true,
ValidIssuer = "IdentiPoint",
ValidAudience = "IdentiPointClients"
};
});
builder.Services.AddAuthorization();
builder.Services.AddControllers();
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
app.Run();
⚙️ appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=MiniIdentityDB;User Id=sa;Password=YourPassword;TrustServerCertificate=True"
},
"Jwt": {
"Secret": "YourStrongSecretKeyHere_AtLeast32Chars"
}
}
👤 AuthController (Register & Login)
using IdentiPoint;
using Microsoft.AspNetCore.Mvc;
namespace IdentiPointDemo.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class AuthController : ControllerBase
{
private readonly MiniIdentityManager _identity;
public AuthController(MiniIdentityManager identity)
{
_identity = identity;
}
[HttpPost("register")]
public async Task<IActionResult> Register([FromBody] RegisterRequest req)
{
var (success, message) = await _identity.RegisterAsync(req.Username, req.Email, req.Password);
if (!success) return BadRequest(new { message });
return Ok(new { message = "User registered successfully" });
}
[HttpPost("login")]
public async Task<IActionResult> Login([FromBody] LoginRequest req)
{
var (ok, token, refresh) = await _identity.LoginAsync(req.UsernameOrEmail, req.Password);
if (!ok) return Unauthorized(new { message = "Invalid credentials" });
return Ok(new { token, refresh });
}
}
public record RegisterRequest(string Username, string Email, string Password);
public record LoginRequest(string UsernameOrEmail, string Password);
}
🔐 ProfileController (Protected Routes)
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
namespace IdentiPointDemo.Controllers
{
[ApiController]
[Route("api/[controller]")]
[Authorize] // 🔒 Requires valid JWT
public class ProfileController : ControllerBase
{
[HttpGet("me")]
public IActionResult GetProfile()
{
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
var username = User.Identity?.Name;
return Ok(new
{
message = "Protected route access granted ✅",
userId,
username,
issuedAt = DateTime.UtcNow
});
}
[HttpGet("secure-data")]
public IActionResult GetSecureData()
{
return Ok(new
{
secret = "This data is only for authenticated users 🔐",
timestamp = DateTime.UtcNow
});
}
}
}
🧩 Extending the DbContext
You can extend MiniIdentityDbContext to include your own entities (e.g., profiles, audit logs).
using Microsoft.EntityFrameworkCore;
namespace IdentiPoint
{
public class CustomIdentityDbContext : MiniIdentityDbContext
{
public CustomIdentityDbContext(DbContextOptions<CustomIdentityDbContext> options)
: base(options) { }
public DbSet<AppUser> AppUsers { get; set; }
}
public class AppUser : MiniUser
{
public string FullName { get; set; }
public string Address { get; set; }
}
}
Update registration in Program.cs if using custom context:
builder.Services.AddDbContext<CustomIdentityDbContext>(opt =>
opt.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
🧱 Optional: Entity Framework Migration
If using SQL Server or another relational DB:
dotnet ef migrations add InitialCreate
dotnet ef database update
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 9.0.10)
- Microsoft.EntityFrameworkCore.InMemory (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.IdentityModel.Tokens (>= 8.14.0)
- System.IdentityModel.Tokens.Jwt (>= 8.14.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.7 | 84 | 2/17/2026 |
- Initial release of IdentiPoint 🚀
- Lightweight identity management and authentication library
- JWT-based login and refresh token support
- DI-ready for ASP.NET Core applications
- Easily extendable for custom user stores