refactor(api): add same-origin backend proxy for auth cookies

This commit is contained in:
2026-07-22 16:18:17 +05:30
parent e077467bce
commit 5d3dac0b21
4 changed files with 23 additions and 16 deletions

View File

@@ -14,9 +14,6 @@ export const authService = {
const response = await axiosAuth.post<AuthResponseData>(
API_ROUTES.AUTH.LOGIN,
payload,
{
withCredentials: true,
},
);
return response.data;
},
@@ -24,14 +21,11 @@ export const authService = {
const response = await axiosAuth.post<AuthResponseData>(
API_ROUTES.AUTH.REFRESH,
{},
{
withCredentials: true,
},
);
return response.data;
},
logout: async (): Promise<void> => {
await axiosAuth.post(API_ROUTES.AUTH.LOGOUT, {}, { withCredentials: true });
await axiosAuth.post(API_ROUTES.AUTH.LOGOUT, {});
},
me: async (): Promise<MeResponse> => {
const response = await axiosClient.get<MeResponse>(API_ROUTES.AUTH.ME);