PageSourceSearch

https://jpmarquez.com/assets/LinkedInCallback-r2-DGCSPgPx.js

js jpmarquez.com collected 2026-10-03 20:08:32 UTC 1,811 bytes, 1 lines download raw bytes

1import{j as n}from"./vendor-query-r2-B0UDiO8U.js";import{r as l}from"./vendor-icons2-r2-sw8q4CDx.js";import{u,H as m}from"./index-r2-B7qKR5Il.js";import{u as h,f}from"./vendor-react2-r2-DThrtG6L.js";import{s as k}from"./client-r2-lkUhMl-9.js";import"./vendor-charts2-r2-P9hqzVnm.js";function C(){const e=h(),[a]=f(),{toast:t}=u();return l.useEffect(()=>{(async()=>{const r=a.get("code"),o=a.get("error"),s=a.get("state"),c=sessionStorage.getItem("linkedin_oauth_state");if(sessionStorage.removeItem("linkedin_oauth_state"),s&&c&&s!==c){t({title:"Authentication Error",description:"Invalid state parameter. Possible CSRF attack.",variant:"destructive"}),e("/admin/linkedin");return}if(o){t({title:"LinkedIn Authentication Failed",description:o,variant:"destructive"}),e("/admin/content-hub");return}if(!r){t({title:"Invalid Callback",description:"No authorization code received",variant:"destructive"}),e("/admin/content-hub");return}try{const{data:i,error:d}=await k.functions.invoke("linkedin-oauth-callback",{body:{code:r}});if(d)throw d;t({title:"LinkedIn Connected Successfully!",description:"Your LinkedIn account is now connected and ready to use."}),e("/admin/content-hub?linkedin=success")}catch(i){console.error("LinkedIn callback error:",i),t({title:"Connection Failed",description:i.message,variant:"destructive"}),e("/admin/content-hub?linkedin=error")}})()},[a,e,t]),n.jsxs("div",{className:"flex items-center justify-center min-h-screen",children:[n.jsx(m,{children:n.jsx("meta",{name:"robots",content:"noindex, nofollow"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Connecting to LinkedIn..."}),n.jsx("p",{className:"text-muted-foreground",children:"Please wait while we complete the authentication."})]})]})}export{C 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.