feat: jwt auth
This commit is contained in:
1 parent
fa2203927a
commit
8be35e9403
10 files changed
+66
-41
No files matched your search
@@ -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);
|
||||
})();
|
||||
Reference in new issue
Block a user