PageSourceSearch

https://chatpedia.ai/assets/DebugAuth-CJsg9I_C.js

js chatpedia.ai collected 2026-10-05 13:04:22 UTC 1,706 bytes, 1 lines download raw bytes

1import{u as h,r as l,j as e,s as t}from"./index-tXC5CGqy.js";const b=()=>{const{user:s,loading:r,initialized:o}=h(),[n,d]=l.useState(null),[i,c]=l.useState(null);return l.useEffect(()=>{(async()=>{const{data:{user:a}}=await t.auth.getUser();if(d(a),a){const{data:u}=await t.from("profiles").select("*").eq("id",a.id).maybeSingle();c(u)}})()},[]),e.jsx("div",{className:"min-h-screen bg-gray-50 p-8",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h1",{className:"text-3xl font-bold mb-8",children:"Auth Debug Info"}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-6 mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Store State"}),e.jsx("pre",{className:"bg-gray-100 p-4 rounded overflow-auto",children:JSON.stringify({user:s,loading:r,initialized:o},null,2)})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-6 mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Supabase Auth User"}),e.jsx("pre",{className:"bg-gray-100 p-4 rounded overflow-auto",children:JSON.stringify(n,null,2)})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Profile Data"}),e.jsx("pre",{className:"bg-gray-100 p-4 rounded overflow-auto",children:JSON.stringify(i,null,2)})]}),s&&e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6 mt-6",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Role Check"}),e.jsxs("p",{className:"mb-2",children:[e.jsx("strong",{children:"user.role:"})," ",s.role||"undefined"]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Type:"})," ",typeof s.role]})]})]})})};export{b 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.