PageSourceSearch

https://clodo.ai/_next/static/chunks/pages/auth/salesforce/callback-86cc0b08e7d504e1.js

js clodo.ai collected 2026-10-05 11:56:05 UTC 2,021 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3576],{18656:function(e,o,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/salesforce/callback",function(){return t(12840)}])},12840:function(e,o,t){"use strict";t.r(o),t.d(o,{default:function(){return i}});var n=t(85893),r=t(67294),c=t(11163);function i(){let e=(0,c.useRouter)(),[o,t]=(0,r.useState)("Processing...");return(0,r.useEffect)(()=>{let o=async()=>{let{code:o}=e.query;if(!o){t("No authorization code received"),setTimeout(()=>{window.location.href="/new"},3e3);return}t("Connecting to Salesforce CRM...");try{let e=localStorage.getItem("token");if(!e){t("Error: Not logged in. Please log in and try again."),setTimeout(()=>{window.location.href="/login"},3e3);return}let n=await fetch("".concat("https://api.clodo.ai","/api/v1/crm/salesforce/callback/"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({code:o})}),r=await n.json();n.ok&&r.success?(t("Salesforce CRM connected successfully! (".concat(r.username||r.org_id||"connected",")")),setTimeout(()=>{window.location.href="/new"},2e3)):(t("Error: ".concat(r.error||"Failed to connect to Salesforce CRM")),setTimeout(()=>{window.location.href="/new"},3e3))}catch(e){console.error("Salesforce OAuth callback error:",e),t("Error: Failed to connect to Salesforce CRM"),setTimeout(()=>{window.location.href="/new"},3e3)}};e.isReady&&o()},[e.isReady,e.query]),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},children:[(0,n.jsx)("h2",{children:"Salesforce OAuth"}),(0,n.jsx)("p",{children:o}),o.includes("Error")&&(0,n.jsx)("p",{style:{color:"#666",fontSize:"0.9rem",marginTop:"1rem"},children:"You will be redirected back to the dashboard shortly."})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=18656)}),_N_E=e.O()}]);

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.