#30MinsLearning

2025-03-11

#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... ...

2025-02-21

#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... ๐Ÿงต

2025-02-20

#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 ...

2025-02-19

#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

2025-02-15

#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

2025-02-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

2025-02-12

#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

2025-02-11

#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

2025-02-09

#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.

2025-02-09

#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.

2025-02-08

#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.

2025-02-07

#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 A...

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst