How to Remove or Hide Individual Endpoints That MapIdentityApi Maps in ASP.NET Core
MapIdentityApi<TUser>() maps ten endpoints and has no switch to skip one. Here are four measured ways to deal with that on .NET 11: hide an endpoint from OpenAPI, make it return 404, shadow it, or remove it from routing entirely, plus the /confirmEmail trap that turns registration into a 500.