cauthy-auth 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1469,7 +1469,8 @@ function createCauthy(given = {}) {
1469
1469
  return json({ status: "verified" });
1470
1470
  }
1471
1471
  if (route === "/sign-in/passkey/begin") {
1472
- const res = await ask(request, "POST", "/v1/auth/webauthn/login/begin", {});
1472
+ const email = typeof b.email === "string" && checkEmail(b.email) === null ? b.email.trim() : "";
1473
+ const res = await ask(request, "POST", "/v1/auth/webauthn/login/begin", email !== "" ? { email } : {});
1473
1474
  if (res.error) return problem(res.status, res.error.code, res.error.message);
1474
1475
  const step = { kind: "passkey", token: String(res.data?.session_id ?? ""), returnTo: afterSignIn };
1475
1476
  return json(