PageSourceSearch

https://securoxen.io/assets/page-BKT-nKDg.js

js securoxen.io collected 2026-10-02 01:58:40 UTC 3,576 bytes, 1 lines download raw bytes

1import{j as e,c as p,E as j,aV as t,aq as b,Q as u,V as m,d as y,Y as f,bX as N}from"./index-0qbe4j-K.js";import{b as i,j as P,L as x}from"./react-vendor-CuqwDvgQ.js";import{C,b as S}from"./card-DYAlVeWP.js";import{L}from"./logo-full-cpKtVGcO.js";import{S as k}from"./spinner-AOg6zabj.js";const E=j("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function R({className:s,variant:n,...o}){return e.jsx("div",{"data-slot":"alert",role:"alert",className:p(E({variant:n}),s),...o})}function F({className:s,...n}){return e.jsx("div",{"data-slot":"alert-description",className:p("text-sm [&_p]:leading-relaxed",s),...n})}function D(){const[s,n]=i.useState(""),[o,g]=i.useState(""),[l,d]=i.useState(!1),[h,w]=i.useState(!1),c=P();i.useEffect(()=>{const r=new URLSearchParams(window.location.hash.substring(1)),a=r.get("access_token");r.get("type")==="recovery"&&a||(t.error("Invalid or expired reset link"),c("/auth/forgot-password-3",{replace:!0}))},[c]);const v=async r=>{if(r.preventDefault(),!s||!o){t.error("Please fill in both password fields");return}if(s!==o){t.error("Passwords do not match");return}if(s.length<6){t.error("Password must be at least 6 characters");return}if(!f){t.error("Authentication is not configured");return}d(!0);try{const{error:a}=await f.auth.updateUser({password:s});if(a)throw a;w(!0),t.success("Password reset successfully!"),setTimeout(()=>{c("/sign-in",{replace:!0})},2e3)}catch(a){t.error(N(a)||"Failed to reset password")}finally{d(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsx(C,{className:"w-full max-w-md",children:e.jsx(S,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"flex justify-center mb-2",children:e.jsx(x,{to:"/",children:e.jsx(L,{width:160})})}),e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Reset your password"}),e.jsx("p",{className:"text-muted-foreground text-balance mt-1",children:"Enter your new password below"})]}),h?e.jsxs(R,{children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx(F,{children:"Your password has been reset successfully. Redirecting to sign in..."})]}):e.jsxs("form",{onSubmit:v,className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-3",children:[e.jsx(u,{htmlFor:"password",children:"New Password"}),e.jsx(m,{id:"password",type:"password",value:s,onChange:r=>n(r.target.value),required:!0,disabled:l,minLength:6,placeholder:"Enter new password"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsx(u,{htmlFor:"confirmPassword",children:"Confirm Password"}),e.jsx(m,{id:"confirmPassword",type:"password",value:o,onChange:r=>g(r.target.value),required:!0,disabled:l,minLength:6,placeholder:"Confirm new password"})]}),e.jsx(y,{type:"submit",className:"w-full cursor-pointer",disabled:l,children:l?e.jsxs(e.Fragment,{children:[e.jsx(k,{size:"sm",className:"mr-2"}),"Resetting password..."]}):"Reset Password"})]}),e.jsx("div",{className:"text-center text-sm",children:e.jsx(x,{to:"/sign-in",className:"underline underline-offset-4",children:"Back to sign in"})})]})})})})}export{D as default};

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.