PageSourceSearch

https://delivr.to/assets/OAuthCallback-C0EP6T9n.js

js delivr.to collected 2026-09-25 19:12:27 UTC 2,526 bytes, 1 lines download raw bytes

1import{j as e}from"./query-DmstuUoN.js";import{h as u,a as r}from"./vendor-CHI41uxr.js";import{L as m,al as i,_ as d}from"./index-CT7kTiav.js";import{C as x}from"./check-circle-2-ChxccshT.js";import{X as h}from"./x-circle-GxcLMn2X.js";import"./ui-WgsiDFN4.js";function w(){const s=u(),[t,a]=r.useState("loading"),[n,l]=r.useState("");return r.useEffect(()=>{(async()=>{try{await d.post("/integrations/oauth/stage_two",null,{headers:{request_url:window.location.href}}),a("success"),setTimeout(()=>{s("/app/settings?tab=integrations",{replace:!0,state:{oauthSuccess:!0}})},2e3)}catch(o){a("error");const c=o instanceof Error?o.message:"Failed to complete OAuth flow";l(c),setTimeout(()=>{s("/app/settings?tab=integrations",{replace:!0,state:{oauthError:c}})},3e3)}})()},[s]),e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-6 p-8 max-w-md",children:[t==="loading"&&e.jsxs(e.Fragment,{children:[e.jsx(m,{size:80,className:"mx-auto text-primary"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Completing OAuth Flow"}),e.jsx("p",{className:"text-muted-foreground",children:"Please wait while we finalize your mailbox integration..."})]})]}),t==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative mx-auto w-20 h-20",children:[e.jsx(i,{size:80,className:"text-success"}),e.jsx(x,{className:"absolute -bottom-1 -right-1 h-8 w-8 text-success bg-background rounded-full"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-semibold text-success",children:"Success!"}),e.jsx("p",{className:"text-muted-foreground",children:"Your mailbox integration has been configured successfully."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Redirecting to settings..."})]})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative mx-auto w-20 h-20",children:[e.jsx(i,{size:80,className:"text-destructive"}),e.jsx(h,{className:"absolute -bottom-1 -right-1 h-8 w-8 text-destructive bg-background rounded-full"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-semibold text-destructive",children:"Error"}),e.jsx("p",{className:"text-muted-foreground",children:n||"An error occurred during the OAuth flow."})]}),e.jsx("a",{href:"/app/settings",className:"inline-block text-primary hover:underline",children:"Return to Settings"})]})]})})}export{w as OAuthCallback};

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.