That Saar ๐Ÿ’Ž @codewithsaar.com ยท Feb 14

#30MinsLearning Day 7: Today, I sit down and read the `/register` endpoint code. Most of them is easy, validate the email, and create the user. This part, though, I don't understand why: ๐Ÿงต #dotnet #csharp #aspnetcore #identity #auth #authZ

1 likes 1 replies

?

Replies

That Saar ๐Ÿ’Ž ยท Feb 14

Well, on the surface, it calls userStore / emailStore to set the username and email, and then passing that on to the userManager to set the password. But thinking about it, why not letting the userManager set the username and email? Isn't that better encapsulation? So I dig into the implementation.