PageSourceSearch

https://app.seonix.ai/assets/GoogleAuthCallbackPage-CdVaaomn.js

js seonix.ai collected 2026-10-05 12:36:48 UTC 2,325 bytes, 1 lines download raw bytes

1import{aM as f,aD as g,ax as u,ai as o,a7 as n}from"./main-CDV9gZpu.js";import{S as m}from"./storage-keys-DNJtb5lo.js";import"./modulepreload-polyfill-B5Qt9EMX.js";function S(){const{t}=f(),e=g(),s=u(c=>c.loadUser),[a,i]=o.useState(null),r=o.useRef(!1);return o.useEffect(()=>{if(r.current)return;r.current=!0;const l=new URLSearchParams(window.location.search).get("error");if(l){i(x(l,t));return}s().then(()=>{if(!u.getState().isAuthenticated){i(t("Sign-in failed. Please try again."));return}const d=h();if(d){window.location.assign(d);return}e("/dashboard",{replace:!0})})},[s,e,t]),n.jsx("div",{className:"flex min-h-screen items-center justify-center bg-slate-50 px-4",children:n.jsx("div",{className:"w-full max-w-sm text-center",children:a?n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-xl font-semibold text-slate-900",children:t("Sign-in failed")}),n.jsx("p",{className:"mt-3 text-sm text-slate-500",children:a}),n.jsx("button",{type:"button",onClick:()=>e("/login",{replace:!0}),className:"cta-gradient mt-6 inline-flex items-center justify-center rounded-full px-6 py-2 text-sm font-semibold text-white",children:t("Back to sign in")})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"mx-auto h-10 w-10 animate-spin rounded-full border-2 border-slate-200 border-t-primary-600"}),n.jsx("p",{className:"mt-4 text-sm text-slate-500",children:t("Signing you in...")})]})})})}function h(){if(typeof window>"u")return null;const t=window.sessionStorage.getItem(m.CONNECT_RETURN_INTENT);if(!t)return null;window.sessionStorage.removeItem(m.CONNECT_RETURN_INTENT);try{const e=JSON.parse(t),s=typeof e.site=="string"?e.site:"",a=typeof e.nonce=="string"?e.nonce:"",i=e.provider==="wordpress"?"wordpress":"";if(!s||!a||!i)return null;const r=new URL("/connect",window.location.origin);return r.searchParams.set("provider",i),r.searchParams.set("site",s),r.hash=`nonce=${encodeURIComponent(a)}`,r.toString()}catch{return null}}function x(t,e){switch(t){case"email_not_verified":return e("Your Google email address is not verified.");case"oauth_disabled":return e("Google sign-in is not configured on this server.");case"state_mismatch":case"missing_code":return e("The sign-in link was invalid. Please try again.");default:return e("Sign-in failed. Please try again.")}}export{S as GoogleAuthCallbackPage};

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.