PageSourceSearch

https://jomi.com/_next/static/chunks/pages/account/two-factor/setup-3ede85e1bd11176a.js

js jomi.com collected 2026-10-02 16:36:41 UTC 9,195 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="842fa50c-a54c-47ca-90ba-fbbd06aa17ad",e._sentryDebugIdIdentifier="sentry-dbid-842fa50c-a54c-47ca-90ba-fbbd06aa17ad")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7232],{25873:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/two-factor/setup",function(){return n(26611)}])},32106:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var i=n(52322);n(2784);var c=n(41075),a=n(69692),r=n(35199),o=n(62197),l=n(8204),s=n(56961),d=n(41664),u=n.n(d),h=n(65992),x=n(66570);function f(){return(0,i.jsxs)(r.Z,{bgcolor:"white",children:[(0,i.jsx)(a.Z,{children:(0,i.jsx)(v,{children:"Settings"})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/profile",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar  - Profile",onClick:x.c.trackClick,children:"Profile"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/general",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Account",onClick:x.c.trackClick,children:"Account"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/two-factor",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Two-Factor Authentication",onClick:x.c.trackClick,children:"Two-factor authentication"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/notifications",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Email Notifications",onClick:x.c.trackClick,children:"Email Notifications"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/purchase-history",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Purchase History",onClick:x.c.trackClick,children:"Purchase History"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/cme-dashboard",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - CME Activity",onClick:x.c.trackClick,children:"CME Activity"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/subscription",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Subscription",onClick:x.c.trackClick,children:"Subscription"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/request-subscription",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Request Institutional Subscription",onClick:x.c.trackClick,children:"Request Institutional Subscription"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/quizzes",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar -  Quizzes",onClick:x.c.trackClick,children:"Quizzes"})})}),(0,i.jsx)(j,{}),(0,i.jsx)(a.Z,{children:(0,i.jsx)(u(),{href:"/account/feedback",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(p,{variant:"text",fullWidth:!0,"data-event":"Account Menu Sidebar - Feedback",onClick:x.c.trackClick,children:"Feedback"})})})]})}let j=(0,h.ZP)(s.Z)(e=>{let{theme:t}=e;return{color:t.palette.grey[200]}}),v=(0,h.ZP)(o.Z)(e=>{let{theme:t}=e;return{color:t.palette.grey[800],fontSize:"28px",textAlign:"start",padding:"8px",fontWeight:"200px"}}),p=(0,h.ZP)(l.Z)(e=>{let{theme:t}=e;return{justifyContent:"flex-start",textTransform:"capitalize",fontSize:"15px",color:t.palette.linkblue.main,paddingLeft:"16px",borderRadius:0}});var g=n(23848),b=n(13037);function Z(){return(0,i.jsx)(a.Z,{bgcolor:"white",height:"100%",alignItems:"center",justifyContent:"center",flex:1,p:3,children:(0,i.jsxs)(a.Z,{children:["Please"," ",(0,i.jsx)(u(),{href:"/login",passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(b.s,{children:"login"})})]})})}function k(e){let{children:t}=e,{data:n}=(0,g.useSession)();return(0,i.jsxs)(c.ZP,{container:!0,spacing:1,children:[(0,i.jsx)(c.ZP,{item:!0,xs:12,lg:3,children:(0,i.jsx)(a.Z,{children:(0,i.jsx)(f,{})})}),(0,i.jsx)(c.ZP,{item:!0,xs:12,lg:9,children:(0,i.jsx)(a.Z,{children:n?t:(0,i.jsx)(Z,{})})})]})}},13037:function(e,t,n){"use strict";n.d(t,{s:function(){return c}});var i=n(23119);let c=(0,n(65992).ZP)(i.Z)(e=>{let{theme:t}=e;return{color:t.palette.linkblue.main,textDecoration:"none",":hover":{textDecoration:"underline",color:t.palette.linkblue.dark}}})},85610:function(e,t,n){"use strict";var i=n(52322),c=n(69692),a=n(86617),r=n(15674),o=n(39935),l=n(2784),s=n(85038),d=n(8634),u=n(80343),h=n(35608);
1t.Z=(0,l.memo)(function(e){let{children:t,noBackground:n,noContainer:x,enableGutters:f,noFooter:j}=e,[v,p]=(0,l.useState)(25),g=(0,l.createRef)(),b=(0,i.jsx)(c.Z,{sx:{display:"flex",flexDirection:"column",flexGrow:1},component:"main",id:"main-content",tabIndex:-1,children:t});return(0,l.useEffect)(()=>{var e,t;(null===(e=g.current)||void 0===e?void 0:e.clientHeight)&&p(null===(t=g.current)||void 0===t?void 0:t.clientHeight)},[p,v,g]),(0,i.jsxs)(c.Z,{height:"100%",minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",sx:{backgroundColor:n?null:"background.default"},children:[(0,i.jsx)(s.Z,{}),(0,i.jsx)(u.Z,{}),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(d.Z,{ref:g}),x?b:(0,i.jsx)(a.Z,{maxWidth:"lg",component:"div",sx:{px:{xs:0,sm:0,md:f?2:0},mb:{md:6}},children:b}),!j&&(0,i.jsx)(r.Z,{theme:o.D4,children:(0,i.jsx)(h.Z,{})})]})]})})},26611:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var i=n(52322),c=n(2784),a=n(9008),r=n.n(a),o=n(11163),l=n(62197),s=n(69692),d=n(45596),u=n(35199),h=n(8204),x=n(11462),f=n(65992),j=n(6824),v=n(23848),p=n(85610),g=n(32106),b=n(90658),Z=n(35040);let k=(0,f.ZP)(l.Z)(e=>{let{theme:t}=e;return{color:t.palette.grey[800],fontSize:"28px",textAlign:"start",padding:"8px",fontWeight:200}});function m(){let e=(0,o.useRouter)(),{enqueueSnackbar:t}=(0,j.Ds)(),{update:n}=(0,v.useSession)(),[a,f]=(0,c.useState)("request"),[m,y]=(0,c.useState)(""),[C,w]=(0,c.useState)(""),[S,T]=(0,c.useState)(""),[A,F]=(0,c.useState)(!1),[H,{loading:P}]=(0,Z.ER)(),[W,{loading:_}]=(0,Z.Cg)(),[z,{loading:E}]=(0,Z.dA)(),M=async()=>{var e,t;T("");try{let{data:t}=await H();(null==t?void 0:null===(e=t.enableTwoFa)||void 0===e?void 0:e.twoFaSessionToken)&&(y(t.enableTwoFa.twoFaSessionToken),f("verify"))}catch(e){T(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:"Could not send code")}},D=async()=>{T("");let i=C.replace(/\D/g,"");try{await W({variables:{input:{twoFaSessionToken:m,code:i}}}),await n(),t("Two-factor authentication is now enabled.",{variant:"success"}),e.push("/account/two-factor")}catch(e){var c;T(null!==(c=null==e?void 0:e.message)&&void 0!==c?c:"Could not verify code")}},B=async()=>{var e,n;T("");try{let{data:n}=await z({variables:{twoFaSessionToken:m}});(null==n?void 0:null===(e=n.resendTwoFaCode)||void 0===e?void 0:e.twoFaSessionToken)&&(y(n.resendTwoFaCode.twoFaSessionToken),t("A new code has been sent.",{variant:"success"}),F(!0),setTimeout(()=>F(!1),6e4))}catch(e){T(null!==(n=null==e?void 0:e.message)&&void 0!==n?n:"Could not resend code")}};return(0,i.jsxs)(p.Z,{children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Set up two-factor authentication | ",b.px]}),(0,i.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,i.jsx)(g.Z,{children:(0,i.jsxs)(s.Z,{bgcolor:"white",height:"100%",flex:1,p:2,pt:0,children:[(0,i.jsx)(k,{variant:"h1",children:"Set up two-factor authentication"}),(0,i.jsxs)(s.Z,{padding:"8px",children:[S&&(0,i.jsx)(l.Z,{color:"error",mb:2,children:S}),"request"===a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{fontSize:"16px",mb:2,children:"We'll send a 6-digit verification code to your account email. The code expires in 10 minutes."}),(0,i.jsx)(s.Z,{children:(0,i.jsx)(x.Z,{variant:"contained",onClick:M,loading:P,children:"Send code"})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{fontSize:"16px",mb:2,children:"Enter the 6-digit code we just sent to your email."}),(0,i.jsx)(s.Z,{mb:2,maxWidth:320,children:(0,i.jsx)(d.Z,{fullWidth:!0,label:"Verification code",size:"small",value:C,onChange:e=>w(e.target.value),inputProps:{inputMode:"numeric",autoComplete:"one-time-code",maxLength:8,"aria-label":"Verification code"},autoFocus:!0})}),(0,i.jsxs)(u.Z,{direction:"row",spacing:1,children:[(0,i.jsx)(x.Z,{variant:"contained",onClick:D,loading:_,disabled:6!==C.replace(/\D/g,"").length,children:"Confirm"}),(0,i.jsx)(h.Z,{onClick:B,disabled:E||A||_,children:A?"Code sent…":"Resend code"}),(0,i.jsx)(h.Z,{color:"inherit",onClick:()=>{f("request"),y(""),w("")},disabled:_,children:"Cancel"})]})]})]})]})})]})}}},function(e){e.O(0,[2189,288,2888,9774,179],function(){return e(e.s=25873)}),_N_E=e.O()}]);

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.