nowfound

Life & fun · May 19, 2024

C4

Checkpoint 401 – forward auth server in TypeScript / Deno

I wrote a forward auth server in TypeScript and Deno. I've written several forward auth servers before but they have always been specifically written for that application. I wanted something more generalised that I could re-use. What is forward auth? Web servers likes Nginx and Caddy and Traefik have a configuration option in which inbound requests are sent to another server before they are allowed. A 200 response from that server means the request is authorised, anything else results in the web server rejecting the request. This is a good thing because it means you can put all your auth…

What it does

In the maker’s words, at launch

I wrote a forward auth server in TypeScript and Deno. I've written several forward auth servers before but they have always been specifically written for that application. I wanted something more generalised that I could re-use. What is forward auth? Web servers likes Nginx and Caddy and Traefik have a configuration option in which inbound requests are sent to another server before they are allowed. A 200 response from that server means the request is authorised, anything else results in the web server rejecting the request. This is a good thing because it means you can put all your auth code in one place, and that the auth code can focus purely on the job of authing inbound requests. Checkpoint 401 aims to be extremely simple - you define a route.json which contains 3 things, the method, the URL pattern to match against and the filename of a TypeScript function to execute against that request. Checkpoint 401 requires that your URL pattern comply with the URL pattern API here: https://developer.mozilla.org/en-US/docs/Web/API/URLPattern/... Your TypeScript function must return a boolean to pass/fail the auth request. That's all there is to it. It is brand new and completely untested so it's really only for skilled TypeScript developers at the moment - and I suggest that if you're going to use it then first read through the code and satisify yourself that it is good - it's only 500 lines: https://raw.githubusercontent.com/crowdwave/checkpoint401/ma...

Does the same job

all alternatives →
  • Full-stack Auth for React/Node by Wasp2023 · ▲241

    Free OSS auth without 3rd party services, deploy anywhere

  • Serverless + Auth0 Webtasks2017 · ▲100

    Webtasks brings Node 8 and no cold starts to the Serverless

  • Nubo2022 · ▲89

    Deploy global Node.js and Deno apps in seconds

  • OS
    Open-Source Auth for NextJS / React2021 · ory.dev · ▲107
  • Nextless.js2022 · ▲111

    Full stack React SaaS starter kit, earn faster your 1st MRR

  • EA
    Effortless Authentication for Your Web Application2022 · ▲6

    Hey folks, Michael here. I have been working in this project on and of for about a year and a half and I finally got it into a state where I can share it. I initially started this project to learn Rust and afterwards decided to make it useful for others. Vulpo Auth is an authentication server that you can host yourself. The goal was to make it as easy as possible for you to get started and have a complete authentication solution without you having to configure anything. Project Website: https://auth.vulpo.dev The Project contains: - Auth Server (Rust) - Admin Dashboard - JS and…

More life & fun this month

the category →
  • TL

    Life & fun · 10d ago · louisabraham.github.io

  • Photosynthesis fires two of your iPhone

    Life & fun · 28d ago · photosynthesis.camera

  • SoloUno310

    Take control of hair pulling, nail biting & skin picking

    Life & fun · 28d ago · solouno.io

  • Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.

    Life & fun · 26d ago · everycube.alen.is

  • The Interactive 3D Encyclopedia

    Life & fun · 21d ago · expeditione.fun

  • Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…

    Life & fun · 26d ago · baselashraf81.github.io

Launched alongside, May 2024

the whole month →
  • Voicenotes1,487

    AI note-taker that's truly intelligent

    AI · 2024 · voicenotes.com

  • Wegic1,181

    The first AI web designer & developer by your side

    Dev tools · 2024 · wegic.ai

  • Insighto1,110

    Ship features users want

    Growth · 2024 · insigh.to

  • Ivee1,087

    The B2B influencer marketing platform

    Growth · 2024

  • Waxwing1,035

    AI copilot for every marketing task

    AI · 2024

  • AI powered zero-waste meal planner

    AI · 2024 · ohapotato.app