How to register with email AND username?
I am using this tuto:
https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity-api-authorization?view=aspnetcore-8.0
But here you just send the email and password. The username becomes the email. How can I make it so that the username is a separate thing?
Use Identity to secure a Web API backend for SPAs
Learn how to use Identity to secure a Web API backend for single page applications (SPAs).
8 Replies
Currently, there's zero customization for the default Identity endpoints
You can write your own, though, using
UserManager
for exampleI see. That's too bad. Do I have to set up the cookie management or will that still be automatic?
for ?useCookies=true
No, that will still work
Ok. Thanks
Do yo know if there are any good tutos for this for .NET 8? Just making sure I'm not doing outdated stuff.
authentication/authorization
Just the docs, IMHO. They're (almost) always up to date
there's so many tutos in the officials docs site
Introduction to Identity on ASP.NET Core
Use Identity with an ASP.NET Core app. Learn how to set password requirements (RequireDigit, RequiredLength, RequiredUniqueChars, and more).
I cant really find any official docs that explain this stuff . I just want to see an example of registration, login, etc in the docs. No frontend stuff in .net, just an api with a controller for this using Identity. I can't find this stuff in the docs
I do see other tutos but it'd be nice to see an official example
so I created my own register method but I couldn't make the route /register cause that's taken by the default Identity register method
can I override it?