mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
Access Token 저장 방식 변경
This commit is contained in:
@@ -4,8 +4,11 @@ import type { RequestHandler } from "./$types";
|
||||
|
||||
export const POST: RequestHandler = async ({ cookies }) => {
|
||||
const token = cookies.get("refreshToken");
|
||||
if (!token) error(401, "Token not found");
|
||||
if (!token) error(401, "Refresh token not found");
|
||||
|
||||
await logout(token.trim());
|
||||
return text("Logged out");
|
||||
|
||||
cookies.delete("accessToken", { path: "/" });
|
||||
cookies.delete("refreshToken", { path: "/api/auth" });
|
||||
return text("Logged out", { headers: { "Content-Type": "text/plain" } });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user