#30MinsLearning
#30MinsLearning Day 2: I put up a MS SQL Server container on the #linux box, there was a bit permission issues for the db file at the beginning, addressed the issue in 30 minutes with some online search. #dotnet #mssql #container.
February 8, 2025 at 6:00 AM
#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... ...
March 11, 2025 at 5:01 PM
#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.
February 9, 2025 at 11:20 PM
#30MinsLearning Day 1: It appears ASP.NET Core Identity is a light-weighted solution to secure web apis. See official docs: learn.microsoft.com/en-us/aspnet.... I think most of apps need that than an OIDC server.
#aspnetcore #dotnet #csharp
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).
learn.microsoft.com
February 7, 2025 at 6:00 AM
#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
February 14, 2025 at 5:53 AM
#30MinsLearning Day 6: Try to understand the relations of asp.net core identity tables. Some are simple, a user could have multiple roles, a role has multiple users, forming a m:n by 3 tables. 🧵 #dotnet #csharp #auth #identity #sql #relational #aspnetcore
February 12, 2025 at 5:46 AM
#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
February 15, 2025 at 5:38 AM
#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
February 11, 2025 at 5:38 AM
#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
February 19, 2025 at 5:54 AM
#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... 🧵
February 21, 2025 at 6:00 AM
#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 ...
February 20, 2025 at 6:01 PM
#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.
February 9, 2025 at 6:19 AM