PageSourceSearch

https://claudemaster.ai/assets/AuthCallback-CfEfNC-t.js

js claudemaster.ai collected 2026-10-05 13:39:14 UTC 2,087 bytes, 1 lines download raw bytes

1import{w as p,r as x,s as h,j as a}from"./index-BxoAbvEi.js";const b=/^sb-.*-auth-token$/;function k(){try{const r=[];for(let n=0;n<localStorage.length;n++){const e=localStorage.key(n);e&&(b.test(e)||e.includes("code-verifier")||e.includes("pkce"))&&r.push(e)}return r}catch{return["<localStorage-blocked>"]}}function w(){const r=p();return x.useEffect(()=>{const n=Date.now(),e=new URL(window.location.href),c=new URLSearchParams(e.hash.replace(/^#/,"")),i=e.searchParams,f={href:e.href,hasCode:i.has("code"),hasState:i.has("state"),hasAccessToken:c.has("access_token"),hasRefreshToken:c.has("refresh_token"),error:c.get("error")||i.get("error"),error_description:c.get("error_description")||i.get("error_description"),storageKeys:k(),ua:navigator.userAgent};console.info("[auth] callback landing",f);let u=!1;async function g(){for(let t=0;t<40;t++){if(u)return null;const{data:s}=await h.auth.getSession();if(s.session)return s.session;await new Promise(o=>setTimeout(o,150))}return null}(async()=>{var d;const t=await g(),s=Date.now()-n;let o="/";try{const l=sessionStorage.getItem("cc.auth.intendedPath");l&&l.startsWith("/")&&!l.startsWith("//")&&(o=l),sessionStorage.removeItem("cc.auth.intendedPath")}catch{}console.info("[auth] callback resolved",{hasSession:!!t,uid:(d=t==null?void 0:t.user)==null?void 0:d.id,elapsedMs:s,intended:o}),!u&&r(o,{replace:!0})})();const{data:m}=h.auth.onAuthStateChange((t,s)=>{console.info("[auth] callback state event",t,{hasSession:!!s})});return()=>{u=!0,m.subscription.unsubscribe()}},[r]),a.jsx("div",{className:"min-h-[100dvh] flex items-center justify-center bg-background text-foreground",children:a.jsxs("div",{className:"text-center space-y-3",children:[a.jsx("div",{className:"w-8 h-8 mx-auto border-2 border-primary border-t-transparent rounded-full animate-spin"}),a.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:"Signing you in…"}),a.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["If this hangs, add ",a.jsx("code",{children:"?debug=1"})," and reload."]})]})})}export{w 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.