Refresh Token 구현 변경

This commit is contained in:
static
2024-12-28 15:44:30 +09:00
parent 796e4a7831
commit 1d0c309878
11 changed files with 233 additions and 79 deletions

9
src/hooks.server.ts Normal file
View File

@@ -0,0 +1,9 @@
import type { ServerInit } from "@sveltejs/kit";
import schedule from "node-schedule";
import { cleanupExpiredRefreshTokens } from "$lib/server/db/token";
export const init: ServerInit = () => {
schedule.scheduleJob("0 * * * *", () => {
cleanupExpiredRefreshTokens();
});
};