Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions web-app/app/actions-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export async function loginWithEmailPassword(
return {
lastInvocationStatus: "error",
error: {
fieldErrors: { password: "Unknown user or incorrect password" },
fieldErrors: {
password: "Unknown user or incorrect password",
email: "Unknown user or incorrect password",
},
},
};
} else {
Expand All @@ -53,7 +56,14 @@ export async function loginWithMagicLink(
? { lastInvocationStatus: "success" }
: {
lastInvocationStatus: "error",
error: { rootError: JSON.stringify(error) },
error:
error.code === "otp_disabled"
? {
fieldErrors: {
email: "Unknown user",
},
}
: { rootError: JSON.stringify(error) },
};
}

Expand Down