mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-25 06:14:25 +00:00
chore: add cookies
This commit is contained in:
9
frontend/web/src/utils/auth.ts
Normal file
9
frontend/web/src/utils/auth.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
export const setAccessToken = (token: string) => {
|
||||
Cookies.set("slash.access-token", token, { path: "/", expires: 365 });
|
||||
};
|
||||
|
||||
export const removeAccessToken = () => {
|
||||
Cookies.remove("slash.access-token", { path: "/", expires: 365 });
|
||||
};
|
Reference in New Issue
Block a user