1import{by as d,a as g,r as i,t as s,s as f,j as t,b as m}from"./index-P6gp-aZt.js";import{c as u}from"./linkedin.functions-DY4VcXNe.js";function h(){const e=d.useSearch(),r=g(u),o=i.useRef(!1),[c,l]=i.useState("Finishing LinkedIn sign-inâ¦");return i.useEffect(()=>{o.current||(o.current=!0,(async()=>{if(e.error){s.error(e.error_description??"LinkedIn sign-in was cancelled"),window.location.assign("/login?mode=signin");return}if(!e.code||!e.state){s.error("Missing LinkedIn response"),window.location.assign("/login?mode=signin");return}try{const n=await r({data:{code:e.code,state:e.state,origin:window.location.origin}});if(n.flow==="signin"){l("Signing you inâ¦");const{error:a}=await f.auth.verifyOtp({type:"magiclink",token_hash:n.tokenHash});if(a)throw a;window.location.assign(n.redirectTo||"/verify-2fa")}else s.success("LinkedIn connected"),window.location.assign(n.redirectTo||"/profile")}catch(n){s.error(n instanceof Error?n.message:"LinkedIn sign-in failed"),window.location.assign("/login?mode=signin")}})())},[r,e]),t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 text-slate-900",children:t.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[t.jsx(m,{className:"size-4 animate-spin"}),c]})})}export{h 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.