PageSourceSearch

https://comms820262222-lead-magnet.lovable.app/assets/_._lovable.oauth.consent-BH-kxQdN.js

js comms820262222-lead-magnet.lovable.app collected 2026-10-03 03:26:31 UTC 1,669 bytes, 1 lines download raw bytes

1import{a as u,r as m,j as e,o as x}from"./index-NGqPzynW.js";import{B as p}from"./button-VKBaRVPZ.js";import"./utils-BQHNewu7.js";function y(){const h=u.useLoaderData(),{authorization_id:a}=u.useSearch(),[t,s]=m.useState(!1),[o,r]=m.useState(null),n=h?.client?.name??"an app";async function i(f){s(!0),r(null);const{data:l,error:c}=f?await x().approveAuthorization(a):await x().denyAuthorization(a);if(c){s(!1),r(c.message);return}const d=l?.redirect_url??l?.redirect_to;if(!d){s(!1),r("No redirect returned by the authorization server.");return}window.location.href=d}return e.jsx("main",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:e.jsxs("div",{className:"w-full max-w-md space-y-6 rounded-xl border border-border bg-card p-6 shadow-lg",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Connect ",n," to Comms8"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n," will be able to call this app's enabled tools while you are signed in."]})]}),e.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-xs text-muted-foreground",children:"This does not bypass this app's permissions. The connection can only read data your account is allowed to see."}),o&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:o}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(p,{variant:"outline",className:"flex-1",disabled:t,onClick:()=>i(!1),children:"Cancel"}),e.jsx(p,{className:"flex-1",disabled:t,onClick:()=>i(!0),children:t?"Working…":"Approve"})]})]})})}export{y 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.