feat(email): improve password reset emails, onboarding templates, and handle server action errors without production obfuscation
All checks were successful
Staging Build / build (push) Successful in 3m28s
All checks were successful
Staging Build / build (push) Successful in 3m28s
This commit is contained in:
@@ -30,8 +30,12 @@ export function ForgotPasswordForm({
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
await resetPassword(email);
|
||||
setSuccess(true);
|
||||
const res = await resetPassword(email);
|
||||
if (res.success) {
|
||||
setSuccess(true);
|
||||
} else {
|
||||
setError(res.error || "Ein Fehler ist aufgetreten.");
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
setError(error instanceof Error ? error.message : "Ein Fehler ist aufgetreten.");
|
||||
} finally {
|
||||
|
||||
@@ -43,8 +43,12 @@ export function UpdatePasswordForm({
|
||||
}
|
||||
|
||||
try {
|
||||
await updatePassword(password);
|
||||
router.push("/");
|
||||
const res = await updatePassword(password);
|
||||
if (res.success) {
|
||||
router.push("/");
|
||||
} else {
|
||||
setError(res.error || "Ein Fehler ist aufgetreten");
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
setError(error instanceof Error ? error.message : "Ein Fehler ist aufgetreten");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user