C
C#10mo ago
MileHDev

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
Angius
Angius10mo ago
Currently, there's zero customization for the default Identity endpoints You can write your own, though, using UserManager for example
MileHDev
MileHDevOP10mo ago
I see. That's too bad. Do I have to set up the cookie management or will that still be automatic? for ?useCookies=true
Angius
Angius10mo ago
No, that will still work
MileHDev
MileHDevOP10mo ago
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
Angius
Angius10mo ago
Just the docs, IMHO. They're (almost) always up to date
MileHDev
MileHDevOP10mo ago
there's so many tutos in the officials docs site
MileHDev
MileHDevOP10mo ago
MileHDev
MileHDevOP10mo ago
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?
Want results from more Discord servers?
Add your server