web: fix reset password token flow and auth interceptor
Some checks failed
Android CI / android (push) Has started running
Android Release / release (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
Codex
2026-03-09 21:52:24 +03:00
parent cbd326ee12
commit 776a7634d2
4 changed files with 90 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ export async function requestPasswordResetRequest(email: string): Promise<void>
}
export async function resetPasswordRequest(token: string, password: string): Promise<void> {
await http.post("/auth/reset-password", { token, password });
await http.post("/auth/reset-password", { token, new_password: password });
}
export async function loginRequest(email: string, password: string, otpCode?: string, recoveryCode?: string): Promise<TokenPair> {

View File

@@ -21,7 +21,16 @@ let refreshInFlight: Promise<void> | null = null;
function shouldSkipRefresh(config?: InternalAxiosRequestConfig): boolean {
const url = config?.url ?? "";
return url.includes("/auth/login") || url.includes("/auth/refresh");
return (
url.includes("/auth/login") ||
url.includes("/auth/refresh") ||
url.includes("/auth/register") ||
url.includes("/auth/check-email") ||
url.includes("/auth/verify-email") ||
url.includes("/auth/resend-verification") ||
url.includes("/auth/request-password-reset") ||
url.includes("/auth/reset-password")
);
}
http.interceptors.response.use(