Skip to content

Instantly share code, notes, and snippets.

View klys's full-sized avatar
🛸
imagine, creating...

klys klys

🛸
imagine, creating...
View GitHub Profile
@klys
klys / gist:ab14be3ac062a7a5c16e064923178091
Created August 5, 2024 02:16
ExpressJS+jose+cookieHttpOnly
import express from "express"
import * as jose from 'jose'
import cookieParser from "cookie-parser"
import fs from 'fs'
/*
const privateKey = fs.readFileSync('./ec-secp256k1-priv-key.pem', 'utf8');
const publicKey = fs.readFileSync('./ec-secp256k1-pub-key.pem', 'utf8');
const privateKeyObject = await jose.importPKCS8(privateKey, 'pem');