PageSourceSearch

https://littlechapters.app/assets/AuthCallback_C0AgRxVh.js

js littlechapters.app collected 2026-10-02 01:15:04 UTC 3,395 bytes, 2 lines download raw bytes

1import{f as m,r as u,j as t}from"./vendor-react_DA5Tp51z.js";import{a4 as f,ai as p,aj as g,v as c,E as b,ac as h,r as x}from"./index_SWRF64zM.js";import"./vendor-supabase_peh8412e.js";import"./vendor-sentry_ionc-ycS.js";import"./vendor-motion_Cx3YYs0B.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"1.37"};var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="5265bfdf-adb0-441e-b89b-f6e6d38910b8",e._sentryDebugIdIdentifier="sentry-dbid-5265bfdf-adb0-441e-b89b-f6e6d38910b8")}catch{}})();const w=2e3,y=async()=>{const{data:{session:e}}=await c.auth.getSession();return e?!0:new Promise(s=>{const{data:a}=c.auth.onAuthStateChange((n,r)=>{r&&(a.subscription.unsubscribe(),s(!0))});setTimeout(()=>{a.subscription.unsubscribe(),s(!1)},w)})},l=async()=>{var i,o;const{data:{session:e}}=await c.auth.getSession(),s=(i=e==null?void 0:e.user)==null?void 0:i.id;if(!s)return"/auth";const a=await b(),n=h();if(n)return`/invite/${n}`;if(a!=null&&a.username)return`/${a.username}`;const r=(o=e.user.user_metadata)==null?void 0:o.username;return typeof r=="string"&&r.length>0?`/${r}`:(x(new Error("Account bootstrap returned no username"),{area:"auth",action:"resolve_auth_callback_username",tags:{user_id:s}}),"/")},v=()=>{document.title="Signing in - Little Chapters";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Completing your Little Chapters sign in.")},I=()=>{const e=m(),[s,a]=u.useState(null);return u.useEffect(()=>{v();let n=!0;return(async()=>{const i=await p(window.location.href);if(!i.ok){if(i.error===g&&await y()){const d=await l();n&&e(d,{replace:!0});return}n&&a(i.error);return}const o=await l();n&&e(o,{replace:!0})})(),()=>{n=!1}},[e]),t.jsx("div",{className:"min-h-screen text-foreground flex items-center justify-center py-6 sm:py-10 px-4",style:{background:"linear-gradient(180deg, #FDF8F3 0%, #F9F1E8 50%, #FDF8F3 100%)",paddingTop:"calc(1.5rem + var(--safe-area-inset-top))",paddingBottom:"calc(1.5rem + var(--safe-area-inset-bottom))",paddingLeft:"calc(1rem + var(--safe-area-inset-left))",paddingRight:"calc(1rem + var(--safe-area-inset-right))"},children:t.jsxs("main",{className:"max-w-[420px] mx-auto w-full text-center",children:[t.jsx("img",{src:"/LC_Logo_vierkant.svg",alt:"Little Chapters Logo",className:"h-16 sm:h-20 w-auto mx-auto mb-6"}),t.jsx("div",{className:"bg-white px-6 py-8 shadow-sm",children:s?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"font-poppins text-xl font-semibold text-[#111] mb-3",children:"This login link did not work"}),t.jsx("p",{className:"font-sans text-sm text-[#111]/70 mb-6",children:s}),t.jsx("button",{type:"button",onClick:()=>e("/auth",{replace:!0}),className:"inline-flex items-center justify-center bg-[#F1914A] px-4 py-2 font-sans text-sm font-semibold text-white transition-colors hover:bg-[#df7d35]",children:"Request a new link"})]}):t.jsxs(t.Fragment,{children:[t.jsx(f,{className:"w-6 h-6 text-[#F1914A] animate-spin mx-auto mb-4"}),t.jsx("p",{className:"font-poppins text-xl font-semibold text-[#111] mb-2",children:"Signing you in"}),t.jsx("p",{className:"font-sans text-sm text-[#111]/70",children:"Your secure login link is being verified."})]})})]})})};export{I as default};
2//# sourceMappingURL=AuthCallback_C0AgRxVh.js.map

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.