feat: completely overhaul the auth model

* Cookies are now encrypted JWTs (GHSA-wrqq-v7qw-r5w7)
* Authentication is stored in the SQLite database (auto-migrated)
* Session logic is much cleaner
This commit is contained in:
Aarnav Tale 2025-08-19 17:49:32 -04:00
parent 8cb91cd45b
commit d2c4f5eb2b
No known key found for this signature in database
29 changed files with 628 additions and 505 deletions

27
pnpm-lock.yaml generated
View file

@ -100,6 +100,9 @@ importers:
isbot:
specifier: ^5.1.28
version: 5.1.28
jose:
specifier: 6.0.12
version: 6.0.12
lucide-react:
specifier: ^0.511.0
version: 0.511.0(react@19.1.1)
@ -142,6 +145,9 @@ importers:
tailwind-merge:
specifier: ^3.3.0
version: 3.3.0
ulidx:
specifier: 2.4.1
version: 2.4.1
undici:
specifier: ^7.10.0
version: 7.10.0
@ -3081,8 +3087,8 @@ packages:
resolution: {integrity: sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==}
hasBin: true
jose@6.0.11:
resolution: {integrity: sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==}
jose@6.0.12:
resolution: {integrity: sha512-T8xypXs8CpmiIi78k0E+Lk7T2zlK4zDyg+o1CZ4AkOHgDg98ogdP2BeZ61lTFKFyoEwJ9RgAgN+SdM3iPgNonQ==}
js-base64@3.7.7:
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
@ -3127,6 +3133,9 @@ packages:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
layerr@3.0.0:
resolution: {integrity: sha512-tv754Ki2dXpPVApOrjTyRo4/QegVb9eVFq4mjqp4+NM5NaX7syQvN5BBNfV/ZpAHCEHV24XdUVrBAoka4jt3pA==}
lefthook-darwin-arm64@1.11.13:
resolution: {integrity: sha512-gHwHofXupCtzNLN+8esdWfFTnAEkmBxE/WKA0EwxPPJXdZYa1GUsiG5ipq/CdG/0j8ekYyM9Hzyrrk5BqJ42xw==}
cpu: [arm64]
@ -4003,6 +4012,10 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
ulidx@2.4.1:
resolution: {integrity: sha512-xY7c8LPyzvhvew0Fn+Ek3wBC9STZAuDI/Y5andCKi9AX6/jvfaX45PhsDX8oxgPL0YFp0Jhr8qWMbS/p9375Xg==}
engines: {node: '>=16'}
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
@ -7415,7 +7428,7 @@ snapshots:
jiti@2.5.1: {}
jose@6.0.11: {}
jose@6.0.12: {}
js-base64@3.7.7: {}
@ -7445,6 +7458,8 @@ snapshots:
kleur@4.1.5: {}
layerr@3.0.0: {}
lefthook-darwin-arm64@1.11.13:
optional: true
@ -7710,7 +7725,7 @@ snapshots:
openid-client@6.5.0:
dependencies:
jose: 6.0.11
jose: 6.0.12
oauth4webapi: 3.5.1
package-json-from-dist@1.0.1: {}
@ -8346,6 +8361,10 @@ snapshots:
typescript@5.9.2: {}
ulidx@2.4.1:
dependencies:
layerr: 3.0.0
undici-types@6.21.0: {}
undici-types@7.10.0: {}