rallly/utils/auth.ts
2022-04-12 07:14:28 +01:00

5 lines
169 B
TypeScript

import { jwtVerify } from "jose";
export const verifyJwt = async (jwt: string) => {
return await jwtVerify(jwt, new TextEncoder().encode(process.env.JWT_SECRET));
};