feat: implement forgot password, added security updates
Some checks failed
Deploy / deploy (push) Successful in 1m28s
Security Tests / security-non-db (push) Failing after 18s
Security Tests / security-db (push) Failing after 22s

This commit is contained in:
2026-03-01 21:47:15 -06:00
parent c7c72e8199
commit 15e0c0a88a
19 changed files with 761 additions and 14 deletions

36
web/src/api/auth.ts Normal file
View File

@@ -0,0 +1,36 @@
import { http } from "./http";
export type ForgotPasswordRequestPayload = {
email: string;
};
export type ForgotPasswordRequestResponse = {
ok: true;
message: string;
};
export type ForgotPasswordConfirmPayload = {
uid: string;
token: string;
newPassword: string;
};
export type ForgotPasswordConfirmResponse = {
ok: true;
};
export function requestForgotPassword(payload: ForgotPasswordRequestPayload) {
return http<ForgotPasswordRequestResponse>("/auth/forgot-password/request", {
method: "POST",
body: payload,
skipAuthRedirect: true,
});
}
export function confirmForgotPassword(payload: ForgotPasswordConfirmPayload) {
return http<ForgotPasswordConfirmResponse>("/auth/forgot-password/confirm", {
method: "POST",
body: payload,
skipAuthRedirect: true,
});
}