refactor: remove refresh token handling in favor of HttpOnly cookie-based authentication

This commit is contained in:
taDuc
2026-05-13 17:45:56 +07:00
parent f1d6f22f80
commit c92aaafc33
3 changed files with 9 additions and 38 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import { clearStoredTokens, setStoredTokens } from "@/auth/tokenStore";
export type AuthTokens = {
access_token: string;
refresh_token: string;
};
export type CurrentUser = {
@@ -21,7 +20,7 @@ export async function signIn(email: string, password: string): Promise<AuthToken
jsonRequestInit("POST", { email, password }),
{ skipAuth: true }
);
if (res?.access_token && res?.refresh_token) setStoredTokens(res);
if (res?.access_token) setStoredTokens(res);
return res;
}