PageSourceSearch

https://mentorly.com/_next/static/chunks/pages/[locale]/personal/settings/authenticator-7dc744e1301f915a.js

js mentorly.com collected 2026-10-09 18:01:42 UTC 3,099 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9390],{95093:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return _}});var r=t(77837),i=t(12757),s=t(87263),a=t.n(s),c=t(38860),o=t.n(c),u=t(72775),l=t(54205),d=t(60259),h=t(27947),p=t(82684),v=t(58258),f=t(43311),x=t(28598),j=function(){var e=(0,f.yQu)(),n=e.data,t=e.loading,r=e.refetch;if(t)return null;if(!(null!=n&&n.viewer))return(0,x.jsx)("p",{children:"Not logged in"});var i=n.viewer.otpRequiredForLogin;return(0,x.jsx)("div",{className:"md:max-w-3xl bg-white p-6 space-y-4",children:i?(0,x.jsx)(m,{onSuccess:r}):(0,x.jsx)(w,{onSuccess:r})})},m=function(e){var n,t=e.onSuccess,s=(0,f.n2Y)(),c=(0,i.Z)(s,1)[0],l=(n=(0,r.Z)(o().mark(function e(){var n,r;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:r=e.sent.data,a()(null==r?void 0:r.removeAuthenticator.errors)?(alert("Success!"),t()):alert(null==r?void 0:r.removeAuthenticator.errors.join(", "));case 5:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("p",{children:"An authenticator has been added to this account"}),(0,x.jsx)(u.Co,{type:"button",onClick:l,children:"Remove"})]})},g=function(e){var n,t=e.onSuccess,s=(0,f.YVd)(),c=(0,i.Z)(s,1)[0],h=(n=(0,r.Z)(o().mark(function e(n,r){var i,s,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.setSubmitting,e.next=3,c({variables:n});case 3:u=e.sent.data,a()(null==u?void 0:u.addAuthenticator.errors)?(alert("Success!"),t()):alert(null==u?void 0:u.addAuthenticator.errors.join(", ")),i(!1);case 7:case"end":return e.stop()}},e)})),function(e,t){return n.apply(this,arguments)});return(0,x.jsx)(d.l0,{id:"otpForm",initialValues:{},onSubmit:h,children:function(e){var n=e.isSubmitting;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l.Z,{type:"input",name:"verificationCode"}),(0,x.jsx)(u.Co,{type:"submit",loading:n,className:"mb-2",children:"Connect"})]})}})},w=function(e){var n=e.onSuccess,t=(0,f.Zrx)(),r=(0,i.Z)(t,2),s=r[0],a=r[1],c=a.data,o=a.loading;return((0,p.useEffect)(function(){s()},[]),o||!c)?null:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"rich-text",children:[(0,x.jsx)("p",{children:"Connect an authenticator app that generates verification codes. You can use the codes when we need to verify your identity."}),(0,x.jsxs)("ol",{children:[(0,x.jsx)("li",{children:"Download and install an authenticator app on your mobile device."}),(0,x.jsx)("li",{children:"Use the app to scan this QR code."}),(0,x.jsx)("li",{children:"Enter the code generated by the app."})]})]}),(0,x.jsx)("div",{children:(0,x.jsx)(v.Z,{value:c.createOtpProvisioningUri.otpProvisioningUri})}),(0,x.jsx)("div",{children:(0,x.jsx)(g,{onSuccess:n})})]})};j.Layout=h.Z;var _=!0;n.default=j},12810:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[locale]/personal/settings/authenticator",function(){return t(95093)}])}},function(e){e.O(0,[7736,9645,2235,944,5764,1797,1399,8258,7947,4205,9774,2888,179],function(){return e(e.s=12810)}),_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.