I have an ASP.NET Core web API, written in .Net 8.
I don’t have an account controller to handle the Identity endpoints, I just added app.MapIdentityApi(); in Program.cs. This method worked fine until I had to modify some of the register logic.
I didn’t know how to extend it and I simply copied the whole Microsoft.AspNetCore.Routing.IdentityApiEndpointRouteBuilderExtensions and added it in my Extensions folder. Of course, I renamed it to be used like this:app.MapCustomIdentityApi();.
Is this an OK way to handle this kind of situation? Please, advise. Thanks!
Boyan Royachki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.