All Articles

Protect your ASP.NET site using Supabase authentication

20 Feb 2024
Sometimes you still want to build a simple server side rendered website, and you want to use simple cookie based auth. Let's explore how we can leverage Supabase Auth to protect our site.
Now that the pendulum is slowly swinging back towards classic plain HTML web servers, we can also simplify our authentication strategies. It's time to go old school again, and build a plain old ASP.NET MVC site using server side razor as our view engine. It's going to contain a very basic set of pages, and navigation links that change based on whether the user is logged in or not. We're going to use Supabase Auth to handle all the actual identity management, as well as providing us with the E-Mail verification functionality.

F# in strange places: Supabase edge functions

31 Dec 2022
With the rising interest in WebAssembly, can we compile F# to WebAssembly, but then use it from a Supabase edge function?
This is my entry for the F# Advent Calendar 2022. Thank you Sergey Tihon for organizing it.

Recursive Async

15 Nov 2018
More involved take on recursion. How to properly type recursion when async is involved.
There was recently a project I was working on that required a recursive call. The problem was, that the function returned an async workflow, and in my inexperience, I was running into the problem that I didn’t know what each exit point should return exactly. This is a problem, because in F# all code paths must return the same type, and I wasn’t sure when I needed to wait for an async call, or return the async workflow itself. The idea behind the function was that it would query the database for a specific string, and if it didn’t find anything, it would shorten the string and try again, until the string was a certain length. After some looking around online, I came across this FSSnip that describes a recusive async function: