PageSourceSearch

https://cloud.resilis.io/assets/sign-in-BwmEEGlz.js

js resilis.io collected 2026-10-02 05:51:20 UTC 3,405 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-Nh__yRYT.js";import{s as E}from"./auth-session-transitions-Dds_Hvew.js";import{a1 as P,a2 as I,w as L,B as A,a4 as h}from"./index-BinsBWQu.js";import{S as D}from"./social-auth-actions-DCDFk4L-.js";import{I as x}from"./input-mDdvRMTd.js";import{L as g}from"./label-Xg45tH-2.js";import{a as s,h as F,g as T,L as v}from"./react-vendor-NvA41F0Y.js";import{E as C}from"./eye-off-DEWjTAry.js";import{E as k}from"./eye-DSWi_tE9.js";import"./alert-BjJ4HKjg.js";import"./github-D9UfpBd8.js";function J(){const[o,j]=s.useState(""),[m,w]=s.useState(""),[t,y]=s.useState(!1),[a,u]=s.useState(!1),[l,S]=s.useState(null),c=F(),[f]=T(),r=P(f.get("returnTo")),{toast:n}=I(),{data:p}=L.useSession();s.useEffect(()=>{l&&p?.user.emailVerified===!0&&c(l)},[l,p,c]);const N=async i=>{i.preventDefault(),u(!0);try{const{data:b,error:d}=await E({email:o,password:m});if(d){if(d.code==="EMAIL_NOT_VERIFIED"){n({title:"Email not verified",description:"Please verify your email address to sign in.",variant:"destructive"}),c(h("/email-verification-pending",{returnTo:r}),{state:{email:o}});return}n({title:"Error",description:d.message||"Failed to sign in",variant:"destructive"});return}if(b){if(f.has("client_id"))return;n({title:"Success",description:"Signed in successfully"}),S(r||"/home")}}catch{n({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}finally{u(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground",children:"Access"}),e.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground",children:"Sign in"})]}),e.jsx(D,{mode:"sign-in",returnTo:r}),e.jsxs("form",{onSubmit:N,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"email",children:"Email"}),e.jsx(x,{id:"email",type:"email",placeholder:"[email protected]",value:o,onChange:i=>j(i.target.value),required:!0,disabled:a})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(g,{htmlFor:"password",children:"Password"}),e.jsx(v,{to:"/forgot-password",className:"text-sm font-medium text-resilis-core hover:underline",children:"Forgot password?"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(x,{id:"password",type:t?"text":"password",placeholder:"••••••••",value:m,onChange:i=>w(i.target.value),required:!0,disabled:a,className:"pr-12"}),e.jsx("button",{type:"button",onClick:()=>y(!t),"aria-label":t?"Hide password":"Show password","aria-pressed":t,className:"absolute right-1 top-1/2 inline-flex h-11 w-11 -translate-y-1/2 items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:h-8 md:w-8",children:t?e.jsx(C,{className:"h-4 w-4"}):e.jsx(k,{className:"h-4 w-4"})})]})]})]}),e.jsx(A,{type:"submit",className:"w-full",disabled:a,children:a?"Signing in...":"Sign in"}),e.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",e.jsx(v,{to:h("/sign-up",{returnTo:r}),className:"font-medium text-resilis-core hover:underline",children:"Sign up"})]})]})]})}export{J as SignInPage};

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.