feat: jwt auth

This commit is contained in:
eneller
2026-03-16 23:41:13 +01:00
parent fa2203927a
commit 8be35e9403
10 changed files with 66 additions and 41 deletions

View File

@@ -0,0 +1,11 @@
import { exportJWK, generateSecret } from "jose"
async function printSecret(secret){
const jwk = await exportJWK(secret);
console.log('🔑Generated Secret:');
console.log(JSON.stringify(jwk));
}
(async () => {
const secret = await generateSecret('HS256', {extractable: true});
await printSecret(secret);
})();