Skip to content

Instantly share code, notes, and snippets.

View Blankeos's full-sized avatar
🦄
Finding unicorns  

Carlo Taleon Blankeos

🦄
Finding unicorns  
View GitHub Profile
@Blankeos
Blankeos / publish-an-npm-package.md
Last active January 17, 2025 03:46
Publishing an NPM Package Guide

Publish an NPM Package

Login

npm login

Inside your Node Project

@Blankeos
Blankeos / auth.middleware.ts
Created April 11, 2024 19:57
A better-documneted Lucia + ElysiaJS auth middleware.
import { lucia } from "@/lib/lucia";
import Elysia from "elysia";
import { verifyRequestOrigin } from "lucia";
import type { User, Session } from "lucia";
/**
* Use this middleware where you want to check if a user is authenticated.
*
* As a black box, you'll be able to see if the user is authenticated via