PageSourceSearch

https://www.fintavapay.com/assets/TwoFa-dc64453d.js

js fintavapay.com collected 2026-09-24 14:43:08 UTC 2,893 bytes, 1 lines download raw bytes

1import{ai as _,r as s,c as E,an as T,E as A,R as f,Q as O,j as e,K as m,X as x,B as C,ao as R,ap as V,a0 as F,aq as I}from"./index-eb9fe256.js";import{A as L}from"./AuthLayout-ce1023b6.js";import{P as B}from"./react-pin-field.esm-d277dcee.js";import{e as D,a as H}from"./eye__on-b59c37a7.js";import"./ResizeObserver.es-b51b3958.js";import"./DeferredSupportChat-4bf5abe8.js";const P="/assets/key-07b19447.svg",Q=()=>{const j=_(),[l,n]=s.useState(!1),[o,i]=s.useState([]),[g,d]=s.useState(!1),r=E(),[u,w]=s.useState(""),p=T("otpToken"),h=s.useRef(0),[a,y]=s.useState(!1);A(t=>t.auth.authData),s.useEffect(()=>{p||(r(f.LOGIN),h.current||O.error("twofa to continue"),h.current+=1)},[]);const v=()=>y(!a),S=async()=>{if(!navigator.onLine)return i(["No internet connection.",...o]);n(!0);const t=await j(R.endpoints.verify2Fa.initiate({otpToken:p,otp:u}));if(!t)return i(["Unexpected error",...o]);if(Object.hasOwn(t,"error")){V(t,i),n(!1);return}F("authData",JSON.stringify(t.data)),i([]),d(!0),setTimeout(()=>{r(f.OVERVIEW),n(!1)},1500),I("otpToken")},b=t=>{w(t)},k=t=>()=>{const c=o.filter((U,N)=>N!==t);i(c)};return e.jsx(e.Fragment,{children:e.jsx(L,{children:e.jsx("div",{className:"twofa flex items-center",children:e.jsxs("div",{className:"twofa-wrapper",children:[e.jsxs("header",{className:"twofa__header",children:[e.jsx("div",{className:"twofa__icon",children:e.jsx("img",{src:P,alt:""})}),e.jsx("span",{children:"Secure verification"}),e.jsx("h2",{className:"twofa--type-header",children:"Two-factor authentication"}),e.jsx("p",{children:"Enter the six-digit code sent to your email address."})]}),e.jsxs("div",{className:"twofa__alerts",children:[o.map((t,c)=>e.jsx(m,{text:t,type:"danger",dismiss:k(c)},x())),g&&e.jsx(m,{text:"Authentication succeeded",type:"success",dismiss:()=>d(!1)},x())]}),e.jsxs("div",{className:"form-pin-group",children:[e.jsxs("div",{className:"twofa__pin-heading",children:[e.jsx("label",{children:"Verification code"}),e.jsxs("button",{type:"button",onClick:v,"data-testid":"toggle-visibility-icon","aria-label":a?"Hide code":"Show code","aria-pressed":a,children:[e.jsx("img",{src:a?H:D,alt:""}),a?"Hide":"Show"]})]}),e.jsx("section",{className:"twofa__pin-fields",children:e.jsx(B,{type:a?"text":"password",length:6,onChange:b,inputMode:"numeric",pattern:"[0-9]*",validate:"0123456789",autoComplete:"one-time-code","aria-label":"Verification code digit"})})]}),e.jsxs("section",{className:"twofa__actions",children:[e.jsx(C,{loading:l,onClick:S,disabled:l||u.length<6,children:e.jsx("span",{children:"Verify and continue"})}),e.jsxs("button",{type:"button",onClick:()=>r(-1),className:"twofa__back-link",children:[e.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"m15 18-6-6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Back"]})]})]})})})})};export{Q 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.