PageSourceSearch

https://files.trackwizz.com/TwoFactorAuthPage.737f71fdee16057b.js

js trackwizz.com collected 2026-10-06 19:53:18 UTC 14,647 bytes, 2 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]="2954229a-a6af-4d3c-9771-7f4ae3422c79",e._sentryDebugIdIdentifier="sentry-dbid-2954229a-a6af-4d3c-9771-7f4ae3422c79")}catch(e){}}();"use strict";(this.webpackChunkfiles_dot_com_web_app=this.webpackChunkfiles_dot_com_web_app||[]).push([["2898"],{84570(e,t,n){n.r(t),n.d(t,{default:()=>M}),n(40481);var r=n(18467),o=n(89875),s=n(37960),i=n(56213),a=n(8358),u=n(90872),c=n(21018),d=n(86326),l=n(96273),p=n(81367),h=n(15646),m=n(32071),f=n(33079),g=n(67970),F=n(71106),y=n(84155),w=n(82448),b=n(5850),A=n(63525),v=n(55336),x=n(10171),T=n(4523),j=n(56233),_=n(82659),I=n(38834),C=n(68241),k=n(70766),E=n(89013),P=n(85047),N=n(57761),D=n(41406),R=n(64835);let S={"authenticator-app":n(58950),"phone-yubi":n(27183),"yubikey-insertion":n(34559),"yubikey-insertionDone":n(45771)};class W extends r.Component{componentDidUpdate(e){let{fields:t,loginError:n}=this.props;n!==e.loginError&&t.otp.input.onChange("")}renderInputField(){let{fields:{otp:e},hasSixDigitCode:t,hasWebauthn:n,hasYubi:r,initiateWebauthn:o,intl:{formatMessage:s},isInvalidCredentials:i,isLoginFetching:a,isSigning:u,loginError:c,signErrors:d,webauthnDomainMismatched:l,webauthnOTP:p}=this.props,h=t&&!r?{maxLength:"6",pattern:"\\d{6}"}:{},m=!t&&r?"password":"text",g=r||t,F=t||r?s({id:"TwoFactorAuthPage.placeholderCode"}):null,y=!n,w=n&&d,b=n&&!!p;return(0,R.jsxs)("div",{className:(0,v.A)("field",{"authenticator-app":!r,yubi:r}),children:[(0,R.jsx)("img",{alt:s({id:"Global.yubikey"}),className:"TwoFactorAuth-Image",src:(({hasSixDigitCode:e,hasWebauthn:t,hasYubi:n,otp:r})=>e?S[t||n?"phone-yubi":"authenticator-app"]:t&&r.input.value?S["yubikey-insertionDone"]:S["yubikey-insertion"])({hasSixDigitCode:t,hasWebauthn:n,hasYubi:r,otp:e})}),D.KF&&g&&n&&(0,R.jsxs)("div",{className:"TwoFactorAuth-windows",children:[(0,R.jsx)(x.A,{className:"security-key",disabled:b||l,isLoading:u,onClick:()=>{o({noAutoRetry:!0})},size:"lg",children:(0,R.jsx)(T.A,{id:"ReauthField.useSecurityKey"})}),(0,R.jsx)("div",{className:"TwoFactorAuth-or or",children:(0,R.jsx)(T.A,{id:"Global.or"})})]}),g&&(0,R.jsx)(j.A,{autoComplete:"one-time-code",autoFocus:y,className:(0,v.A)("text","TwoFactorAuth-Input",{"authenticator-otp":!r,"authenticator-yubi":r}),disableLastPass:!0,field:e,inputMode:"numeric",large:!0,onChange:t=>e.input.onChange(t.target.value?.trim?.()),placeholder:F,required:!b,type:m,usePlaceholderAsAriaLabel:!0,...h}),w&&(0,R.jsx)("div",{className:" TwoFactorAuth-Error",children:(0,R.jsx)(C.A,{className:"tw-my-3",type:"error",useAriaAnnouncement:!0,children:d?.[0]&&d[0].formatted?s({id:d[0].formatId}):d?.[0]})}),c&&!w&&i&&!a&&(0,R.jsx)("div",{className:"TwoFactorAuth-Error",children:(0,R.jsx)(C.A,{className:"tw-my-3",type:"error",useAriaAnnouncement:!0,children:c?.size>0?(0,R.jsx)(_.Ay,{errors:c,namespace:f.iD.request}):(0,R.jsx)(T.A,{id:"TwoFactorAuthPage.loginFailed"})})}),!c&&!a&&(0,R.jsx)("div",{className:" TwoFactorAuth-Error",children:(0,R.jsx)(I.A,{field:e.meta})})]})}render(){let{fields:{otp:e},handleSubmit:t,hasSixDigitCode:n,hasWebauthn:r,hasYubi:o,intl:{formatMessage:s},loginPage:i,noSupportedTwoFactorAuthenticationMethodsAvailable:a,onlyWebauthn:u,onSubmit:c,settings:d,submitText:l,twoFactorAuthenticationMethodsAsString:p,twoFactorIsFetching:h,webauthnDomainMismatched:m}=this.props,f=d.domain,g=p.split("_"),F=p?g.length:0;return(0,R.jsxs)("section",{className:"PublicPageSection",children:[i&&(0,R.jsx)(T.A,{className:"PublicPageHeader",h1:!0,id:"TwoFactorAuthPage.title"}),m&&(0,R.jsx)(C.A,{className:"tw-my-3",type:"error",useAriaAnnouncement:!0,children:(0,R.jsx)(b.A,{id:"TwoFactorAuthPage.webauthnDomainMismatched",values:{domain:`https://${f}`,link:e=>(0,R.jsx)(k.A,{href:e,children:e})}})}),!(m&&u)&&(0,R.jsxs)("form",{method:"post",noValidate:!0,onSubmit:t(c),children:[(0,R.jsx)("div",{className:"field",children:F>0&&(0,R.jsx)("div",{className:"TwoFactorAuth-description",children:F>1?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(b.A,{id:"TwoFactor.method.instruction"}),(0,R.jsx)("div",{className:"tw-mt-1",children:g.map(e=>(0,R.jsx)("ol",{className:"tw-list-disc tw-py-0.5 tw-px-6",children:(0,R.jsx)("li",{children:(0,N.VF)({formatMessage:s,map:P.kC,mapKey:e,mapName:"twoFactorMethodInstructionMessageIds",values:{isStandalone:!1}})})}))})]}):(0,R.jsx)(E.A,{map:P.kC,mapKey:p,mapName:"twoFactorMethodInstructionMessageIds",values:{isStandalone:!0}})})}),this.renderInputField(),(0,R.jsx)("div",{className:(0,v.A)("field","group",{hideButtons:a}),children:(0,R.jsx)(x.A,{className:"PublicPageSubmitButton",disabled:r&&!o&&!n,isInvalid:(o||n)&&(!e.input.value||!!e.meta?.error),isLoading:h,size:"lg",type:"submit",children:l||(0,R.jsx)(T.A,{id:"Global.continue",n
1oSpan:!0})})})]})]})}}let q=(0,A.Zz)((0,i.Ng)(e=>({isInvalidCredentials:(0,g.ld)(e),isLoginFetching:(0,g.I7)(e),isSigning:m.isSigning(e),settings:e.users.get("settings").toJS(),webauthnOTP:m.getUserTwoFactorWebauthnOTP(e)})),o.Ay)(W);n(40399);class O extends r.Component{static defaultProps={loginIsFetching:!1};componentDidMount(){let{doesntHaveDesktopParams:e,hasWebauthn:t,history:n,isDesktopAppLogin:r,onlyWebauthn:o,requestTwoFactorPartialCode:s,setDesktopParams:i,signWebauthnReset:a,tfaDomainMismatched:u}=this.props;a(),!u&&(t||o)&&this.initiateWebauthn(),t||s(),e&&r&&i({loginFrom:n.location.pathname})}componentDidUpdate(e){let{hasWebauthn:t,isLoggingIn:n,onlyWebauthn:r,tfaDomainMismatched:o}=this.props;!e.hasWebauthn&&t&&!n&&!o&&(t||r)&&this.initiateWebauthn()}initiateWebauthn=({noAutoRetry:e}={})=>{let{logout:t,webauthnSign:n}=this.props;n({cancelByTimeout:!0,noAutoRetry:e,onCancel:()=>t({nextPath:d.loginPath,replaceURL:!0}),onOTP:e=>this.onSubmit({otp:e})})};onSubmit=({otp:e})=>{let{isDesktopAppLogin:t,login:n,loginDetails:r}=this.props;n({...r,isDesktop:t,otp:e})};render(){let{loginIsFetching:e}=this.props;return(0,R.jsx)("div",{className:"TwoFactorAuth PublicPageContainer PublicPageContainer-small",children:(0,R.jsx)(q,{...this.props,initiateWebauthn:this.initiateWebauthn,loginPage:!0,onSubmit:this.onSubmit,twoFactorIsFetching:e})})}}let L={login:f.iD.request,logout:f.ri.request,requestTwoFactorPartialCode:h.DJ.request,setDesktopParams:f.dR.request,signWebauthnReset:h.fQ.reset,webauthnSign:h.fQ.request},M=(0,s.Zz)(o.Ay,(0,i.Ng)(e=>{let t=(0,g.Vr)(e),n=(0,y.Cr)({customDomain:e.users.getIn(["settings","domain"]),hasWebauthn:t.x,urlHostname:(0,F.EW)()});return{doesntHaveDesktopParams:!(0,g.L4)(e),isDesktopAppLogin:(0,g.L4)(e),isLoggingIn:g.xk(e),loginDetails:(0,g.Xb)(e),loginError:(0,g._h)(e),loginFrom:(0,g._8)(e),loginIsFetching:(0,g.I7)(e),signErrors:(0,m.getSignErrors)(e)?.toJS(),tfaDomainMismatched:n,...t}},L),(0,a.A)({form:"auth.twoFactor",validate:({otp:e},{intl:t,twoFactorAuthenticationMethodsAsString:n})=>{let r={};if(!e){if(!n?.length)return r;r.otp=t.formatMessage({id:"TwoFactor.required.auth"})}return r}}),(0,c.A)(["otp"]),l.A,(0,s.IN)(({history:e,isDesktopAppLogin:t})=>t?{}:{isDesktopAppLogin:"desktop"===(0,p.UP)(e?.location?.query?.state).flow}),w.A,(0,u.A)({namespaces:[h.fQ.request]}
1))(O)},21018(e,t,n){n.d(t,{A:()=>u});var r=n(37960),o=n(75016),s=n(76513),i=n(64835);let a=({baseComponentProps:e,names:t,WrappedComponent:n,...r})=>{let o=e?.fields||{};return(0,i.jsx)(n,{...e,fields:{...o,...r}})},u=e=>t=>(0,r.Zz)((0,r.k1)(`WithFields(${(0,s.Mn)(t)})`))(n=>(0,i.jsx)(o.A,{baseComponentProps:n,component:a,names:e,WrappedComponent:t}))},85047(e,t,n){n.d(t,{E8:()=>o,RB:()=>a,ZJ:()=>i,kC:()=>r,rr:()=>s});let r={email:"TwoFactor.method.instruction.email",sms:"TwoFactor.method.instruction.sms",static:"TwoFactor.method.instruction.static",totp:"TwoFactor.method.instruction.totp",webauthn:"TwoFactor.method.instruction.webauthn",yubi:"TwoFactor.method.instruction.yubi"},o={email:"TwoFactor.method.name.full.email",sms:"TwoFactor.method.name.full.sms",static:"TwoFactor.method.name.full.static",totp:"TwoFactor.method.name.full.totp",webauthn:"TwoFactor.method.name.full.webauthn",yubi:"TwoFactor.method.name.full.yubi"},s={email:"TwoFactor.method.moreInfo.email",sms:"TwoFactor.method.moreInfo.sms",totp:"TwoFactor.method.moreInfo.totp",webauthn:"TwoFactor.method.moreInfo.webauthn",yubi:"TwoFactor.method.moreInfo.yubi"},i={email:"TwoFactor.method.name.short.email",sms:"TwoFactor.method.name.short.sms",static:"TwoFactor.method.name.short.static",totp:"TwoFactor.method.name.short.totp",webauthn:"TwoFactor.method.name.short.webauthn",yubi:"TwoFactor.method.name.short.yubi"},a={done:"TwoFactorSettingsRow.webauthnInstructionsDone",pending:"TwoFactorSettingsRow.webauthnInstructions"}},75016(e,t,n){n.d(t,{A:()=>S});var r,o,s,i,a,u,c,d,l=n(82689),p=n(76884),h=n(89814),m=n(18467),f=n(12741),g=n.n(f),F=n(88324),y=n.n(F),w=n(73369),b=n.n(w),A=n(75264),v=n(56213),x=n(74044),T=n(95872),j=n(7375),_=n(49365),I=["_reduxForm"],C=n(71890),k=n(41002),E=n(98833),P=function(e){return e?Array.isArray(e)||e._isFieldArray?void 0:Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'):Error('No "names" prop was specified <Fields/>')},N=g().oneOfType([g().func,g().arrayOf(g().func),g().objectOf(g().oneOfType([g().func,g().arrayOf(g().func)]))]),D={component:_.A,format:g().func,parse:g().func,props:g().object,forwardRef:g().bool,validate:N,warn:N},R=function(e,t){return Array.isArray(e)||"function"==typeof e?e:b()(e,t,void 0)};let S=(o=(r=T.A).deepEqual,s=r.getIn,i=r.size,a=function(e,t){var n=s(e,t);return n&&n._warning?n._warning:n},(u=function(e){function t(t){var n;return(n=e.call(this,t)||this).onChangeFns={},n.onFocusFns={},n.onBlurFns={},n.ref=m.createRef(),n.prepareEventHandlers=function(e){return e.names.forEach(function(e){n.onChangeFns[e]=function(t){return n.handleChange(e,t)},n.onFocusFns[e]=function(){return n.handleFocus(e)},n.onBlurFns[e]=function(t){return n.handleBlur(e,t)}})},n.handleChange=function(e,t){var r=n.props,o=r.dispatch,s=r.parse,i=r._reduxForm,a=(0,j.A)(t,{name:e,parse:s});o(i.change(e,a)),i.asyncValidate&&i.asyncValidate(e,a,"change")},n.handleFocus=function(e){var t=n.props;(0,t.dispatch)(t._reduxForm.focus(e))},n.handleBlur=function(e,t){var r=n.props,o=r.dispatch,s=r.parse,i=r._reduxForm,a=(0,j.A)(t,{name:e,parse:s});o(i.blur(e,a)),i.asyncValidate&&i.asyncValidate(e,a,"blur")},n.prepareEventHandlers(t),n}(0,h.A)(t,e);var n=t.prototype;return n.UNSAFE_componentWillReceiveProps=function(e){var t=this;this.props.names!==e.names&&(i(this.props.names)!==i(e.names)||e.names.some(function(e){return!t.props._fields[e]}))&&this.prepareEventHandlers(e)},n.shouldComponentUpdate=function(e){var t=this,n=Object.keys(e),r=Object.keys(this.props);return!!(this.props.children||e.children||n.length!==r.length||n.some(function(n){return!~I.indexOf(n)&&!o(t.props[n],e[n])}))},n.isDirty=function(){var e=this.props._fields;return Object.keys(e).some(function(t){return e[t].dirty})},n.getValues=function(){var e=this.props._fields;return Object.keys(e).reduce(function(t,n){return T.A.setIn(t,n,e[n].value)},{})},n.getRenderedComponent=function(){return this.ref.current},n.render=function(){var e=this,t=this.props,n=t.component,o=t.forwardRef,s=t._fields,i=t._reduxForm,a=(0,A.A)(t,["component","forwardRef","_fields","_reduxForm"]),u=i.sectionPrefix,c=i.form,d=Object.keys(s).reduce(function(t,n){var o=s[n],i=(0,x.A)(r,n,(0,l.A)({},o,{},a,{form:c,onBlur:e.onBlurFns[n],onChange:e.onChangeFns[n],onFocus:e.onFocusFns[n]})),d=i.custom,p=(0,A.A)(i,["custom"]);t.custom=d;var h=u?n.replace(u+".",""):n;return T.A.setIn(t,h,p)},{}),p=d.custom,h=(0,A.A)(d,["custom"]);return o&&(h.ref=this.ref),m.createElement(n,(0,l.A)({},h,{},p))},t}(m.Component)).propTypes={component:_.A,_fields:g().object.isRequired,props:g().object},c=(0,v.Ng)(function(e,t){var n=t.names,r=t._reduxForm,o=r.initialValues,i=(0,r.getFormState)(e);return{_fields:n.reduce(function(e,n){var r,u=s(i,"initial."+n),c=void 0!==u?u:o&&s(o,n),d=s(i,"values."+n),l=(r=s(i,"syncErrors"),T.A.getIn(r,n+"._error")||T.A.getIn(r,n)),p=a(s(i,"syncWarnings"),n),h=s(i,"submitting"),m=d===c;return e[n]={asyncError:s(i,"asyncErrors."+n),asyncValidating:s(i,"asyncValidating")===n,dirty:!m,initial:c,pristine:m,state:s(i,"fields."+n),submitError:s(i,"submitErrors."+n),submitFailed:s(i,"submitFailed"),submitting:h,syncError:l,syncWarning:p,value:d,_value:t.value},e},{})}},void 0,void 0,{forwardRef:!0})(u),(d=function(e){function t(t){if((n=e.call(this,t)||this).connected=(0,m.createRef)(),!t._reduxForm)throw Error("Fields must be inside a component decorated with reduxForm()");var n,r=P(t.names);if(r)throw r;return n}(0,h.A)(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return(0,C.A)(this,e)},n.componentDidMount=function(){this.registerFields(this.props.names)},n.UNSAFE_componentWillReceiveProps=function(e){if(!T.A.deepEqual(this.props.names,e.names)){var t=this.props,n=t._reduxForm.unregister;
1this.props.names.forEach(function(e){return n((0,k.A)(t,e))}),this.registerFields(e.names)}},n.componentWillUnmount=function(){var e=this.props,t=e._reduxForm.unregister;this.props.names.forEach(function(n){return t((0,k.A)(e,n))})},n.registerFields=function(e){var t=this,n=this.props,r=n._reduxForm.register;e.forEach(function(e){return r((0,k.A)(n,e),"Field",function(){return R(t.props.validate,e)},function(){return R(t.props.warn,e)})})},n.getRenderedComponent=function(){return y()(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Fields"),this.connected.current?this.connected.current.getRenderedComponent():null},n.render=function(){var e=this.props;return(0,m.createElement)(c,(0,l.A)({},this.props,{names:this.props.names.map(function(t){return(0,k.A)(e,t)}),ref:this.connected}))},(0,p.A)(t,[{key:"names",get:function(){var e=this.props;return this.props.names.map(function(t){return(0,k.A)(e,t)})}},{key:"dirty",get:function(){return!!this.connected.current&&this.connected.current.isDirty()}},{key:"pristine",get:function(){return!this.dirty}},{key:"values",get:function(){return this.connected.current?this.connected.current.getValues():{}}}]),t}(m.Component)).propTypes=(0,l.A)({names:function(e,t){return P(e[t])}},D),(0,E.Po)(d))},58950(e,t,n){e.exports=n.p+"32dd7748732412ad.svg"},27183(e,t,n){e.exports=n.p+"6c48676ce82ff09c.svg"},34559(e,t,n){e.exports=n.p+"35966985c48728d6.svg"},45771(e,t,n){e.exports=n.p+"15f9b37a42e127fd.svg"}}]);
2//# sourceMappingURL=TwoFactorAuthPage.737f71fdee16057b.js.map

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.