PageSourceSearch

https://elnacional.ec/assets/OAuthCallback-ChzeCugZ.js

js elnacional.ec collected 2026-10-02 13:42:29 UTC 2,028 bytes, 1 lines download raw bytes

1import{c as g,e as x,f as w,a as s,t as v,j as e,s as j,L as S}from"./index-DmuA0bGG.js";import{P as N}from"./Page-ZZpGWyYo.js";import{t as E}from"./authReturn-CCtFCpIT.js";const r={oauth:"No pudimos conectar con el proveedor. Intenta de nuevo.",oauth_cancelled:"Cancelaste el inicio de sesión.",oauth_no_email:"Tu cuenta no entregó un correo con el que podamos continuar.",oauth_rejected:"Tu cuenta no está habilitada para ingresar aquí. La web es exclusiva para socios."};function k(){const{t:h}=g(),c=x(),{registerSuccess:i}=w(),[f,a]=s.useState("Confirmando tu acceso…"),[p,t]=s.useState(!1),l=s.useRef(!1);return s.useEffect(()=>{if(l.current)return;l.current=!0;const u=new URLSearchParams(window.location.hash.slice(1));window.history.replaceState(null,"",window.location.pathname);const d=u.get("error");if(d){t(!0),a(r[d]??r.oauth);return}const m=u.get("code");if(!m){t(!0),a("Enlace incompleto. Vuelve a intentar desde el login.");return}(async()=>{const o=await v.postSocialExchange(m);if(!o?.satisfactory){t(!0),a(o?.message||r.oauth);return}const n=o.data;if(n?.status==="LOGIN"&&n?.fan?.token){await i(n.fan),c(E()??"/");return}t(!0),a("No encontramos una cuenta de socio con ese correo. La web es exclusiva para socios: si ya eres socio, ingresa con tu correo o cédula; si aún no, afíliate desde la sección Hazte Socio.")})()},[c,i]),e.jsx(N,{title:h("auth.page-title")??"Ingreso",children:e.jsx("main",{className:"grid min-h-screen w-full place-items-center p-4",children:e.jsxs("div",{className:"flex w-full max-w-md flex-col items-center text-center",children:[e.jsx("img",{src:j,alt:"El Nacional",className:"h-20 w-auto object-contain drop-shadow"}),e.jsx("p",{className:"mt-6 text-white/85",children:f}),p&&e.jsx(S,{to:"/login",className:"mt-6 inline-flex h-11 items-center justify-center rounded-xl bg-red-600 px-6 font-black tracking-widest text-white uppercase shadow-lg transition-all duration-200 hover:bg-red-700 active:scale-[0.99]",children:"Volver al login"})]})})})}export{k 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.