PageSourceSearch

https://app.pentrova.ai/assets/ResetMfa-vaszYltY.js

js pentrova.ai collected 2026-10-05 14:00:08 UTC 2,744 bytes, 1 lines download raw bytes

1import{v as u,r as i,b4 as x,g,j as e,aB as f,aK as p,A as t,B as a,Q as o}from"./index-_c_gQtrU.js";import{l as j}from"./logger-BDByOH17.js";import{C as w,d as k}from"./card-Bn2mZpzU.js";function C(){const[d]=u(),r=d.get("token")??"",[s,n]=i.useState("ready"),[l,c]=i.useState(""),h=i.useCallback(async()=>{n("working"),c("");try{await x.confirmMfaReset(r),j.log("mfa_reset_redeemed"),n("done")}catch(m){c(g(m,"This reset link is invalid or has expired. Ask your administrator for a new one.")),n("failed")}},[r]);return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:e.jsx(w,{className:"w-full max-w-lg shadow-e3",children:e.jsxs(k,{className:"space-y-6 p-6 sm:p-8",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:s==="done"?e.jsx(f,{className:"h-5 w-5 text-success","aria-hidden":"true"}):e.jsx(p,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),e.jsx("h1",{className:"text-h1 font-semibold text-foreground",children:s==="done"?"Authenticator removed":"Reset two-factor authentication"})]}),r?s==="done"?e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"success",children:"Your old authenticator no longer works. Sign in with your password and you will be asked to set up two-factor authentication again."}),e.jsx(a,{asChild:!0,className:"w-full","data-testid":"reset-mfa-signin",children:e.jsx(o,{to:"/login",children:"Sign in"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This removes the authenticator app currently registered to your account and all of its backup codes. You will set up a new one the next time you sign in."}),e.jsx(t,{variant:"warning",children:"If you did not ask for this reset, close this page and contact support. Someone may be attempting to take over your account."}),s==="failed"&&l?e.jsx(t,{variant:"destructive",children:l}):null,e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row-reverse",children:[e.jsx(a,{onClick:h,disabled:s==="working",className:"flex-1","data-testid":"reset-mfa-confirm",children:s==="working"?"Removing…":"Remove my authenticator"}),e.jsx(a,{asChild:!0,variant:"outline",className:"flex-1",disabled:s==="working",children:e.jsx(o,{to:"/login",children:"Cancel"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"warning",children:"This page needs the one-time link from your email. Open the link in the message titled “Action required: two-factor authentication reset”."}),e.jsx(a,{asChild:!0,variant:"outline",className:"w-full",children:e.jsx(o,{to:"/login",children:"Back to sign in"})})]})]})})})}export{C 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.