diff --git a/src/authchecker.ts b/src/authchecker.ts index 0052b68..9b62dfa 100644 --- a/src/authchecker.ts +++ b/src/authchecker.ts @@ -40,6 +40,12 @@ const authchecker = async (action: Action, permissions: string | string[]) => { } else { throw new HttpError(403, "no") } - return true; + // + try { + jwt.verify(provided_token, process.env.JWT_SECRET || "secretjwtsecret"); + return true + } catch (error) { + return false + } } export default authchecker \ No newline at end of file