fix: save and send cookie in dev setup

This commit is contained in:
eneller
2026-03-08 20:39:04 +01:00
parent c9a2cd8d66
commit fa2203927a
7 changed files with 44 additions and 27 deletions

13
server/src/util/auth.ts Normal file
View File

@@ -0,0 +1,13 @@
import { Request } from "express"
import User from "../model/user"
import { JWT, JWK } from 'ts-jose';
const privateKey = process.env.FM_PRIVATE_KEY;
export function checkJWT(req: Request){
// TODO check JWT
return req.cookies.jwt
}
export function getJWT(user: User){
return 'toekn'
}