#30MinsLearning Day 12, in the code implementation, this Context.SignInAsync() method got me confused for quite a while. Firstly, there's no SignInAsync() method on HttpContext class: learn.microsoft.com/en-us/dotnet... ...
#30MinsLearning Day 11, today, I read the code and created a top level sequential for `/login` of #aspnetcore#identity. The code is pretty straightforward. It supports 2 types of scheme - cookie or token. It starts with user name, password sign in, and check to see if 2FA is needed. For 2FA... ๐งต
#30MinsLearning Day 10, move on to read '/login' in #aspnetcore#identity, keys about handling the SignInResult. And here's a break down of it. The class is pretty straight forward ๐งต๐ #dotnet#csharp There are 4 boolean properties: Succeeded, IsLockedOut, IsNotAllowed, RequestTwoFactor. And 5 ...
#30MinsLearning Day 9, Ok, this 1 took 30+ mins. Well, to understand the code for `/register` of #aspnetcore#identity, I created a sequential chart to visualize it:
It takes 7 parties to finish the registration. It is #SOLID, but is it #overengineered? What about KISS? Worth it? ๐ค #dotnet#csharp
#30MinsLearning Day 8: Today, I read the code of UserManager.CreateAsync(), it relies on the PasswordStore to set the password hash, then calls the UserStore to create the user in real - like in db. The responsibilities are quite clear. >>>๐งต #dotnet#csharp#aspnetcore#identity#auth#authZ
#30MinsLearning Day 5: I got the identityDB context into a #sql server. It is a journey. To reach here, I ran a sql express in #container on #Ubuntu, get basics of #EntityFramework migrations, figured out the nugets to reference, and derived IdentityDbContext. ๐ช #dotnet
#30MinsLearning Day 4: migrated the first database using entity framework core 9.0 into the SQL database. It turned out the most difficult part was actually write the correct connection string.
#30MinsLearning Day 3: Tried to connect to the sql server locally. I used the SSMS years ago. On Linux, I'll need some crossplat, #vscode mssql ext looks good. Turned out, most of the 30 mins today figuring the port 1434 (not the default 1433) I mapped by mistake ๐ซ #dotnet#mssql#container.