分享给需要帮助的人:记一次 IdentityAPI 中注册的源码解读:设置用户账户为未验证状态,以及除此之外更安全的做法: 延迟用户创建。包含了对优缺点的说明,以及适用场景。 在ASP.NET 8 Identity 中注册API的源码如下: routeGroup.MapPost("/register", async Task<Results<Ok, ValidationProblem>> ([FromBody] RegisterRequest registration, HttpContext context, [FromServices] IServiceProvider sp) => { var userManager = sp.GetRequiredService<UserManager<TUser>>(); if (!userManager.SupportsUserEmail) { throw new NotSupportedException($"{nameof(MapIdentityApi)} requires a user store with email...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with async
Contact async, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack