PageSourceSearch

https://auth.buffer.com/assets/LoginVerification-DYFl_vYB.js

js buffer.com collected 2026-09-24 06:40:28 UTC 3,100 bytes, 1 lines download raw bytes

1import{M as e,O as t,P as n,k as r,t as i}from"./jsx-runtime-CL-DilWO.js";import{n as a}from"./LegalFooter-CZUOGWXy.js";import{t as o}from"./Paragraph-DnxD1iSX.js";import{t as s}from"./Notice-hJmUoi3l.js";import{t as c}from"./Button-Dfnu3zd4.js";import{t as l}from"./Strong-r9Gl_OZn.js";import{n as u}from"./pageTitle-DrP3IrGA.js";import{t as d}from"./NoticeScreen-Biuxx72A.js";var f=n(e()),p={resendUnavailable:`_resendUnavailable_awq2w_8`},m=i(),h=u(`Verify Log In`),g=120,_=`7ad20604fe6cb45bc6c0`,v=`mt1`;function y(e){return`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`}var b=r(function({params:e}){let{uid:n}=e,[r]=t(),i=r.get(`accountId`),u=r.get(`maskedEmail`),[h,b]=(0,f.useState)(null),[x,S]=(0,f.useState)(null),[C,w]=(0,f.useState)(!1),T=(0,f.useRef)(null);(0,f.useEffect)(()=>{async function e(){try{let e=await fetch(`/interaction/${n}/resend-verification-status`);if(e.ok){let t=await e.json();S(t.remainingSeconds>0?t.remainingSeconds:0)}else S(g)}catch{S(g)}}e()},[n]),(0,f.useEffect)(()=>{if(!i){b(`Missing account information. Please try logging in again.`);return}let e=document.createElement(`script`);return e.src=`https://js.pusher.com/8.0.1/pusher.min.js`,e.async=!0,e.onload=()=>{E()},document.body.appendChild(e),()=>{T.current&&T.current.disconnect(),document.body.removeChild(e)}},[n,i]),(0,f.useEffect)(()=>{if(x===null||x<=0)return;let e=setInterval(()=>{S(e=>e!==null&&e>0?e-1:0)},1e3);return()=>clearInterval(e)},[x]);function E(){try{if(!window.Pusher)throw Error(`Pusher not loaded`);let e=new window.Pusher(_,{cluster:v,channelAuthorization:{endpoint:`/interaction/${n}/pusher/auth`,transport:`ajax`}});T.current=e,e.subscribe(`private-login-${i}`).bind(`login-verification-successful`,()=>{window.location.href=`/interaction/${n}/login-verified`})}catch(e){console.error(`Error initializing Pusher:`,e),b(`Failed to initialize verification. Please refresh the page.`)}}async function D(){if(!(x===null||x>0||C)){w(!0),b(null);try{let e=await fetch(`/interaction/${n}/resend-verification`,{method:`POST`,headers:{"Content-Type":`application/json`}});if(e.status===429){S((await e.json()).remainingSeconds);return}if(!e.ok)throw Error(`Failed to resend verification email`);S(g)}catch{b(`Failed to resend email. Please try again.`)}finally{w(!1)}}}let O=x===null||x>0||C;return(0,m.jsxs)(d,{state:`info`,title:`Verify Your Login via Email`,action:(0,m.jsx)(c,{onClick:D,"aria-disabled":O?!0:void 0,className:O?p.resendUnavailable:void 0,variant:`secondary`,size:`large`,children:x===null?`Loading...`:x>0?`Resend Email (${y(x)})`:`Resend Email`}),children:[(0,m.jsx)(o,{children:`Looks like you're logging in from a new device or location.`}),u&&(0,m.jsxs)(s,{variant:`info`,children:[`For security purposes we've sent a verification link to you on`,` `,(0,m.jsx)(l,{children:u})]}),(0,m.jsxs)(o,{children:[`Can't find the email? Search for an email from`,` `,(0,m.jsx)(a,{href:`mailto:[email protected]`,children:`[email protected]`}),`, and check your spam folder too.`]}),h&&(0,m.jsx)(s,{variant:`error`,children:h})]})});export{b as default,h as meta};

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.