(values: z.infer<typeof magicLinkSchema>)
| 34 | }); |
| 35 | |
| 36 | const onSignIn = async (values: z.infer<typeof magicLinkSchema>) => { |
| 37 | setIsLoading(true); |
| 38 | captureEvent("wa_login_with_magic_link", {}); |
| 39 | |
| 40 | signIn("nodemailer", { email: values.email, redirect: false, redirectTo: callbackUrl ?? "/" }) |
| 41 | .then(() => { |
| 42 | setIsLoading(false); |
| 43 | |
| 44 | router.push("/login/verify?email=" + encodeURIComponent(values.email)); |
| 45 | }) |
| 46 | .catch((error) => { |
| 47 | console.error("Error signing in", error); |
| 48 | setIsLoading(false); |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | return ( |
| 53 | <Form |
nothing calls this directly
no test coverage detected