Because Developers are Awesome

Recent posts

Customizing Keycloak with Aspire - Part 3

October 04, 2024  6 minute read  

This is the last article in a trio of articles about incorporating Keycloak into .NET Aspire applications. Thus far, I’ve covered the basics and some common customizations. This part covers what you need to do if you want to store the identity information within a PostgreSQL database. I’ve chosen PostgreSQL for this because it seems to be the database of choice for Aspire when you want to run things locally and in the cloud and also because the PostgreSQL database driver is included by def...

Customizing Keycloak with Aspire - Part 2

September 30, 2024  4 minute read  

In my last article, I introduced the Keycloak identity service and showed how the development version can be easily integrated into a project. Development services get you started quickly and allow you to defer the details until later on. At some point, however, you need to take control of your service and start working towards production. There are a number of things that the development version of the Keycloak identity service doesn’t do that you need in production. These include SSL/TL...

Integrating Keycloak with Aspire - Part 1

September 26, 2024  8 minute read  

In my series on ASP.NET Identity, I mentioned (several times) that you should be using Keycloak, Auth0, Corbado, or another identity service instead of rolling your own. That’s all good, but I left it up to you to figure out exactly how to do that. I thought it would be a good idea to configure an Aspire project from the beginning and show how authentication and authorization with a service works. This article will be more of a “make the code work” type of article, with follow-on articles ...

ASP.NET Identity deep dive - Part 6 (Social logins)

September 20, 2024  11 minute read  

This article is one of a number of articles I will write over the coming month and will go into depth about the ASP.NET Identity system. My outline thus far: Project setup Account registration Signing in and out with a username and password Password reset Email confirmations Social logins Now that I have the basic flows sorted out (which includes username/password with registration, self-service password reset, and account lockout support), it’s time to turn my attention to o...

ASP.NET Identity deep dive - Part 5 (Sending email)

September 18, 2024  12 minute read  

This article is one of a number of articles I will write over the coming month and will go into depth about the ASP.NET Identity system. My outline thus far: Project setup Account registration Signing in and out with a username and password Password reset Email confirmations Social logins Today is the final spot for the basic flows. Up to this point, I’ve been logging links in places where I should be sending emails. Sending emails in development is scary. First, things co...

ASP.NET Identity deep dive - Part 4 (Password reset)

September 16, 2024  7 minute read  

This article is one of a number of articles I will write over the coming month and will go into depth about the ASP.NET Identity system. My outline thus far: Project setup Account registration Signing in and out with a username and password Password reset Email confirmations Social logins I’ve already implemented the registration and login/logout functionality. I’ve also done some updates since the last check in. Most notably, I’ve automatically signed the user in after regis...

ASP.NET Identity deep dive - Part 3 (Authentication)

September 14, 2024  6 minute read  

This article is one of a number of articles I will write over the coming month and will go into depth about the ASP.NET Identity system. My outline thus far: Project setup Account registration Signing in and out with a username and password Password reset Email confirmations Social logins Today, I’m tackling authentication - that is, signing in and out of an account using the web UI. You may remember from my last article that I set up the initial web UI to include a link to ...

ASP.NET Identity deep dive - Part 2 (Registration)

September 13, 2024  13 minute read  

This article is one of a number of articles I will write over the coming month and will go into depth about the ASP.NET Identity system. My outline thus far: Project setup Account registration Signing in and out with a username and password Password reset Email confirmations Social logins As you may remember from the last article, the first user journey I am going to implement is the registration journey. This is actually one of the more complex journeys with several parts t...

ASP.NET Identity deep dive - Part 1 (Project setup)

September 11, 2024  8 minute read  

You may have noticed that I included ASP.NET Identity in a project a couple of posts ago. I’m currently doing a deep dive into ASP.NET Identity with an eye towards an OIDC identity service based on OpenIddict. Identity is a complex topic and I still recommend that developers integrate another service rather than write their own: Keycloak is a good option if you have to store your own data, Auth0 is a good option when you just want a bunch of social providers, Corbado has support for...

.NET Aspire configuration patterns

September 09, 2024  10 minute read  

If you recall my last article, I transitioned my working application to .NET Aspire. This opinionated pattern allows me to run a complete microservice application within Docker Desktop, but then seamlessly deploy to Azure Container Apps and other platform services with the same code base. This is a great productivity boost for a developer. My current project builds an OIDC identity service that has both username/password (local) authentication and social logins like Google and Facebook. To ...