PageSourceSearch

https://lukeroes.com/assets/forgot-password-CIMMI4Kk.js

js lukeroes.com collected 2026-10-09 18:31:50 UTC 1,827 bytes, 1 lines download raw bytes

1import{D as i,E as m,t as r,j as s,B as n,L as o}from"./index-D_1-n0R3.js";import{u as l}from"./useForm-DurB8yE7.js";import{a as c}from"./auth-client-DNJTCDlw.js";import{I as d}from"./input-C4jK6iv1.js";import{L as u}from"./label-DC6XubDR.js";import"./index-BgSko9xd.js";function w(){const t=l({defaultValues:{email:""},onSubmit:async({value:e})=>{await c.requestPasswordReset({email:e.email,redirectTo:`${window.location.origin}/reset-password`},{onSuccess:()=>{r.success("If that email exists, a reset link has been sent.")},onError:a=>{r.error(a.error.message||a.error.statusText||"Unable to send reset email.")}})},validators:{onSubmit:i({email:m("Invalid email address")})}});return s.jsxs("div",{className:"mx-auto mt-10 w-full max-w-md p-6",children:[s.jsx("h1",{className:"mb-2 text-center font-bold text-3xl",children:"Forgot password"}),s.jsx("p",{className:"mb-6 text-center text-muted-foreground text-sm",children:"Enter your email and we'll send you a password reset link."}),s.jsxs("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),t.handleSubmit()},className:"space-y-4",children:[s.jsx(t.Field,{name:"email",children:e=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(u,{htmlFor:e.name,children:"Email"}),s.jsx(d,{id:e.name,name:e.name,type:"email",value:e.state.value,onBlur:e.handleBlur,onChange:a=>e.handleChange(a.target.value)}),e.state.meta.errors.map(a=>s.jsx("p",{className:"text-destructive text-sm",children:a?.message},a?.message))]})}),s.jsx(t.Subscribe,{children:e=>s.jsx(n,{type:"submit",className:"w-full",disabled:!e.canSubmit||e.isSubmitting,children:e.isSubmitting?"Sending...":"Send reset link"})})]}),s.jsx("div",{className:"mt-4 text-center",children:s.jsx(n,{variant:"link",asChild:!0,children:s.jsx(o,{to:"/login",children:"Back to sign in"})})})]})}export{w as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.