PageSourceSearch

https://fauxlens.com/assets/AuthFinishPage-yKHShQAw.js

js fauxlens.com collected 2026-10-02 00:50:31 UTC 9,416 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-BcCXzDUs.js";import{u as Q,r as i}from"./vendor-react-CTUCDoiA.js";import{M as X,u as N,N as Z,O as J,d as f,P as d,Q as ee,R as te,U as ne,H as ie,X as se,v as o,Y as K,y as P,Z as ae,_ as re,G as oe,$ as le,a0 as ce,a1 as de,a2 as H,a3 as ue}from"./main-DqEbgH6R.js";import{d as me}from"./vendor-icons-BwzaQ6Gc.js";import"./modulepreload-polyfill-BfhVlcuL.js";import"./vendor-firebase-BG_nNvEu.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"6a4e691cf2be6b808c8876231f720214eb6faeef"},t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=(function(r){for(var l=1;l<arguments.length;l++){var n=arguments[l];if(n!=null)for(var c in n)n.hasOwnProperty(c)&&(r[c]=n[c])}return r})({},t._sentryModuleMetadata[new t.Error().stack],{"_sentryBundlerPluginAppKey:fauxlens-web":!0})}catch{}})();const he="com.fauxlens.android",fe="fauxlens.com/__/auth/action";function pe(t){if(!t)return null;let r;try{r=new URL(t).searchParams}catch{return null}const l=r.get("oobCode");if(!l)return null;const n=new URLSearchParams({mode:"signIn",oobCode:l}),c=r.get("apiKey");return c&&n.set("apiKey",c),`intent://${fe}?${n.toString()}#Intent;scheme=https;package=${he};end`}function xe(t){return/Android/i.test(t??"")}function _e(t){return t.provenance===X.APP&&xe(t.userAgent)&&t.intentUrl!==null}const ge=1500;function ve(){const t=Q(),r=i.useId(),l=i.useId(),n=N(s=>s.signInSettlement),c=N(s=>s.setResumePurchaseVariantId),U=N(s=>!!s.currentUser),S=N(s=>s.currentUser?.email??null),[p,u]=i.useState(null),[Y,B]=i.useState(!0),[k,j]=i.useState(!1),x=p?p==="dead"?"dead_link":p==="already"?"already_signed_in":p==="here"?"signed_in_here":"gave_up":n==="already_signed_in"?"already_signed_in":n==="needs_email"?Y?"working":"needs_email":n==="retryable"?"retryable":n==="dead_link"?"dead_link":"working",a=U&&(x==="dead_link"||x==="gave_up"||x==="retryable")?"already_signed_in":x,[_,G]=i.useState(""),[F]=i.useState(()=>Z()),[m,v]=i.useState(null),[$,V]=i.useState(0),h=i.useRef(null),[y,q]=i.useState(null),[C,T]=i.useState(!1),[g]=i.useState(()=>typeof window>"u"?null:J(window.location.search)),b=_e({provenance:g,userAgent:typeof navigator>"u"?void 0:navigator.userAgent,intentUrl:y});i.useEffect(()=>{if(n!==null){if(n==="signed_in"){f("email_link_opened",{same_device:!0,surface:"web"}),t(d()??"/detect",{replace:!0});return}if(n==="none"){t(d()??"/",{replace:!0});return}if(n==="collision"){t("/",{replace:!0});return}if(n==="needs_email"){f("email_link_opened",{same_device:!1,surface:"web"}),h.current=h.current??ee()??window.location.href,q(pe(h.current));let s=!0;return te(h.current).then(w=>{s&&(w==="dead"&&(f("login_failed",{reason:"auth/invalid-action-code",detail:"superseded_or_expired",sign_in_path:H.EMAIL_LINK}),u("dead")),B(!1))}),()=>{s=!1}}}},[n,t]),i.useEffect(()=>{if(a!=="already_signed_in")return;const s=window.setTimeout(()=>{t(d()??"/detect",{replace:!0})},ge);return()=>window.clearTimeout(s)},[a,t]);const M=i.useRef(!1);i.useEffect(()=>{!b||M.current||(M.current=!0,f("email_link_handoff_offered",{provenance:g??"none"}))},[b,g]);const W=()=>{y&&(f("email_link_handoff_tapped",{provenance:g??"none"}),window.location.href=y,window.setTimeout(()=>{document.visibilityState==="visible"&&T(!0)},1500))},z=async s=>{s.preventDefault();const w=_.trim();if(!w||k)return;j(!0);const A=await ae(w,h.current??void 0,{crossContext:!0});if(j(!1),A.completed){const L=re();oe("login",{method:ue.EMAIL_LINK,source:L??"unknown"});const E=le("buy_credits");if(E&&c(E.variantId),ce({sign_in_path:H.EMAIL_LINK,source:L??"unknown",resumed_intent:!!E,uid:de.currentUser?.uid??null}),!E&&!L){u("here");return}t(d()??"/detect",{replace:!0});return}if(A.alreadySignedIn){u("already");return}const I=A.error?.code;if(I==="auth/expired-action-code"||I==="auth/invalid-action-code"){u("dead");return}if(I==="auth/network-request-failed"){v("No connection. Check your network and try again.");return}if(I==="auth/too-many-requests"){v("Too many tries. Wait a minute, then try again.");return}const O=$+1;if(V(O),O>=3){u("gave_up");return}v("That address does not match the one this link was sent to.")},R=ne(),D=R?.kind==="buy_credits"?R:void 0;return e.jsxs("main",{className:"min-h-screen bg-[#121212] flex items-start sm:items-center justify-center p-4 pt-[max(1rem,10vh)] sm:pt-4",children:[e.jsxs(ie,{children:[e.jsx("title",{children:"Sign in to FauxLens"}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsxs("div",{className:"w-full max-w-sm bg-[#1a1a1a] border border-[#333] rounded-xl shadow-2xl px-6 py-7",children:[e.jsx("div",{className:"mb-5",children:e.jsx(se,{iconClassName:"w-5 h-5",textClassName:"text-base"})}),a==="working"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:"Signing you in"}),e.jsxs("p",{className:"text-white/70 text-sm mt-1 flex items-center gap-2","aria-live":"polite",children:[e.jsx(me,{size:14,className:"animate-spin motion-reduce:animate-none"}),"One moment."]})]}),a==="needs_email"&&b&&!C&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:"Finish in the app"}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4",children:"You asked for this link in the FauxLens app, so that is where your account is waiting."}),e.jsx("button",{type:"button",onClick:W,className:"w-full min-h-[48px] bg-[#00E5FF] hover:bg-white text-black font-bold tracking-wide text-sm rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00E5FF]/60",children:"Open the FauxLens app"}),e.jsx("button",{type:"button",onClick:()=>T(!0),className:"w-full min-h-[48px] mt-2 text-sm text-white/70 hover:text-white rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-white/40",children:"Nothing happened? Finish here instead"})]}),a==="needs_email"&&(!b||C)&&e.jsxs("form",{onSubmit:z,children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:o.EMAIL_LINK_CONFIRM_TITLE}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4",children:o.EMAIL_LINK_CONFIRM_BODY}),e.jsx("label",{htmlFor:r,className:"block text-[#00E5FF] text-[10px] font-bold uppercase tracking-widest font-mono mb-2",children:"Email"}
1),e.jsx("input",{id:r,type:"email",value:_,onChange:s=>G(s.target.value),placeholder:"[email protected]",autoComplete:"email",inputMode:"email",spellCheck:!1,autoCapitalize:"off","aria-invalid":m?!0:void 0,"aria-describedby":m?l:void 0,className:"w-full min-h-[48px] bg-black/50 border border-white/20 rounded p-3 text-white text-sm font-mono focus:border-[#00E5FF] focus:outline-none focus:shadow-[0_0_15px_rgba(0,229,255,0.2)]"}),e.jsx("p",{"aria-live":"assertive",className:"sr-only",children:m??""}),m&&e.jsx("p",{id:l,className:"text-[#FF2E63] text-xs font-mono mt-2",children:m}),e.jsx("button",{type:"submit",disabled:k,className:"w-full min-h-[48px] mt-3 bg-[#00E5FF] hover:bg-white text-black font-bold tracking-wide text-sm rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00E5FF]/60 disabled:opacity-60",children:k?"Signing you in...":"Finish signing in"})]}),a==="already_signed_in"&&e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"text-xl font-bold text-white tracking-tight break-words",children:[o.EMAIL_LINK_ALREADY_SIGNED_IN_TITLE,S?` as ${S}`:""]}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4","aria-live":"polite",children:o.EMAIL_LINK_ALREADY_SIGNED_IN_BODY}),e.jsx("button",{type:"button",onClick:()=>t(d()??"/detect",{replace:!0}),className:"w-full min-h-[48px] bg-[#00E5FF] hover:bg-white text-black font-bold tracking-wide text-sm rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00E5FF]/60",children:"Continue"})]}),a==="signed_in_here"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:o.EMAIL_LINK_CROSS_DEVICE_TITLE}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4",children:o.EMAIL_LINK_CROSS_DEVICE_BODY}),e.jsx("button",{type:"button",onClick:()=>t(d()??"/detect",{replace:!0}),className:"w-full min-h-[48px] bg-[#00E5FF] hover:bg-white text-black font-bold tracking-wide text-sm rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00E5FF]/60",children:"Continue"})]}),a==="retryable"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:o.EMAIL_LINK_RETRY_TITLE}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4",children:o.EMAIL_LINK_RETRY_BODY}),e.jsx(K,{source:P.AUTH_FINISH,submitLabel:"Or send a new link",compact:!0,initialEmail:_.trim()||F||void 0,action:D})]}),(a==="dead_link"||a==="gave_up")&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:a==="dead_link"?o.EMAIL_LINK_DEAD_TITLE:"Let us start over"}),e.jsx("p",{className:"text-white/70 text-sm mt-1 mb-4",children:a==="dead_link"?o.EMAIL_LINK_DEAD_BODY:"That address did not match. We stop after three tries. Enter your email and we will send a new link."}),e.jsx(K,{source:P.AUTH_FINISH,submitLabel:"Send a new link",compact:!0,initialEmail:_.trim()||F||void 0,action:D})]})]})]})}export{ve 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.