PageSourceSearch

https://my.dnb.com/src_components_pages_OktaMFA_OktaMFAPage_tsx.8265d6994886c7954a13.js

js dnb.com collected 2026-09-24 09:07:50 UTC 14,790 bytes, 2 lines download raw bytes

vendor: 4,518 bytes, lines 1-2
1/*! For license information please see src_components_pages_OktaMFA_OktaMFAPage_tsx.8265d6994886c7954a13.js.LICENSE.txt */
2"use strict";(self.webpackChunkmarketplace_portal_ui=self.webpackChunkmarketplace_portal_ui||[]).push([["src_components_pages_OktaMFA_OktaMFAPage_tsx"],{43557(e,t,n){n.d(t,{A:()=>o});var r=n(74848);const o=function(e){var t=e.children;return(0,r.jsx)("div",{className:"marketplace-page relative grid grid-flow-row rounded-sm border-t-0 border-gray-border text-sm desktop:text-base",id:"marketPlaceView",children:t})}},36867(e,t,n){n.r(t),n.d(t,{default:()=>g});var r=n(96540),o=n(43557),a=n(84166),c=function(e){return a.A.get("/services/okta/catalog?userId=".concat(e)).then(function(e){return e.data}).catch(function(e){console.log(e.message)})},i=n(74848);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var s=r&&r.prototype instanceof i?r:i,l=Object.create(s.prototype);return u(l,"_invoke",function(n,r,o){var a,i,s,l=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,i=0,s=e,f.n=n,c}};function p(n,r){for(i=n,s=r,t=0;!d&&l&&!o&&t<u.length;t++){var o,a=u[t],p=f.p,v=a[2];n>3?(o=v===r)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(i=0,f.v=r,f.n=a[1]):p<v&&(o=n<3||a[0]>r||r>v)&&(a[4]=n,a[5]=r,f.n=v,i=0))}if(o||n>1)return c;throw d=!0,r}return function(o,u,v){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,v),i=u,s=v;(t=i<2?e:s)||!d;){a||(i?i<3?(i>1&&(f.n=-1),p(i,s)):f.n=s:f.v=s);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(t){a=e,i=1,s=t}finally{l=1}}return{value:t,done:d}}}(n,o,a),!0),l}var c={};function i(){}function s(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),p=d.prototype=i.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=d,u(p,"constructor",d),u(d,"constructor",s),s.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,r,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:v}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){function a(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},u(e,t,n,r)}function d(e,t,n,r,o,a,c){try{var i=e[a](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,o)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?v(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y={message:"",selectedFactorName:"",selectedFactorPayload:{},selectedMFAObj:"",passCode:"",passcodeEnabled:!1},b=function(e,t){switch(t.type){case"SET_MESSAGE":return m(m({},e),{},{message:t.value});case"SET_SELECTED_FACTOR_NAME":return m(m({},e),{},{selectedFactorName:t.value});case"SET_FACTOR_API_OBJECT":return m(m({},e),{},{selectedFactorPayload:t.value});case"SET_SELECTED_MFA_OBJECT":return m(m({},e),{},{selectedMFAObj:t.value});case"SET_PASS_CODE":return m(m({},e),{},{passCode:t.value});case"SET_PASS_CODE_ENABLED":return m(m({},e),{},{passcodeEnabled:t.value});case"SET_RESET":return m({},y);default:return null}};const E=function(){var e=f((0,r.useReducer)(b,y),2),t=e[0],n=e[1],o=t.message,s=t.selectedFactorName,u=t.selectedFactorPayload,p=t.selectedMFAObj,v=t.passCode,m=t.passcodeEnabled,h=f((0,r.useState)([]),2),E=h[0],g=h[1],_=f((0,r.useState)(""),2),A=_[0],O=_[1],j=f((0,r.useState)(null),2),T=j[0],x=j[1],N=f((0,r.useState)({}),2),k=N[0],C=N[1],P=localStorage.getItem("okta-token-storage"),F=JSON.parse(P).idToken.claims,w=F.sub,D=F.emailID;F.phoneNumber,(0,r.useEffect)(function(){I()},[]);var I=function(){var e,t=(e=l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c(w).then(function(e){g(e)});case 1:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){d(a,r,o,c,i,"next",e)}function i(e){d(a,r,o,c,i,"throw",e)}c(void 0)})});return function(){return t.apply(this,arguments)}}(),G=function(){var e=p.factorType,t=p.provider;"sms"===e?(u.enrollFactor.profile.phoneNumber=A,M(u)):("GOOGLE-token:software:totp"==="".concat(t,"-").concat(e)||"OKTA-push"==="".concat(t,"-").concat(e))&&M(u)},M=function(e){var t,r=e.enrollFactor,o=r.provider,c=r.factorType;(t=e,a.A.post("/services/okta/factorEnrolling",t).then(function(e){return e.data}).catch(function(e){console.log(e.message)})).then(function(e){var t,r;x(e.id),O(""),(null==e||null===(t=e._embedded)||void 0===t||null===(t=t.activation)||void 0===t?void 0:t._links)&&C(e._embedded.activation._links.qrcode);var a=null==e||null===(r=e._links)||void 0===r?void 0:r.poll;a&&"OKTA-push"==="".concat(o,"-").concat(c)?(a.href&&L(e.id),K("Scan below QR code for MFA Activation")):"email"===c?(n({type:"SET_PASS_CODE_ENABLED",value:!0}),K("Sent MFA Activation code to register email Successfully !!")):K("Sent MFA Activation code Successfully !!")})},L=function(e){var t,n={userId:w,factorId:e},r=setInterval(function(){var e;if(t&&"WAITING"!==(null===(e=t)||void 0===e?void 0:e.factorResult))return clearInterval(r),void R();(function(e){return a.A.post("/services/okta/pollingQRCode",e).then(function(e){return e.data}).catch(function(e){console.log(e.message)})})(n).then(function(e){t=e})},5e3)},R=function(){I(),O(""),n({type:"SET_PASS_CODE",value:""}),x(null),n({type:"SET_SELECTED_FACTOR_NAME",value:""}),n({type:"SET_PASS_CODE_ENABLED",value:!1}),K("Activated MFA Successfully !!")},K=function(e){n({type:"SET_MESSAGE",value:e}),setTimeout(function(){n({type:"SET_MESSAGE",value:""})},5e3)},q={OKTA_email:"Email Authentication",OKTA_sms:"SMS Authentication",GOOGLE_token_software_totp:"Google Authenticator",OKTA_push:"Okta Verify"};return(0,i.jsxs)("div",{className:"mfa-page-container",children:[(0,i.jsx)("p",{className:"mfa-header",children:"Okta MFA Configuration"}),o&&(0,i.jsxs)("h3",{className:"message",children:[o," ",m]}),E&&E.map(function(e){return(0,i.jsx)(r.Fragment,{children:q["".concat(e.provider,"_").concat(e.factorType.replaceAll(":","_"))]&&(0,i.jsxs)("div",{className:"grid-container ".concat(s==="".concat(e.provider,"-").concat(e.factorType)?"factor-selected":""),children:[(0,i.jsx)("div",{className:"grid-item",children:q["".concat("".concat(e.provider,"_").concat(e.factorType.replaceAll(":","_")))]}),"NOT_SETUP"===e.status?(0,i.jsx)("button",{className:"button-setup",onClick:function(){n({type:"SET_PASS_CODE_ENABLED",value:!1}),function(e){var t=e.factorType,r=e.provider,o={};switch("".concat(e.provider,"-").concat(e.factorType)){case"OKTA-sms":o={userId:w,enrollFactor:{factorType:t,provider:r,profile:{phoneNumber:A}}};break;case"OKTA-email":M(o={userId:w,enrollFactor:{factorType:t,provider:r,profile:{email:D}}});break;case"OKTA-push":case"OKTA-token:software:totp":case"GOOGLE-token:software:totp":C(""),o={userId:w,enrollFactor:{factorType:t,provider:r}}}n({type:"SET_FACTOR_API_OBJECT",value:o}),n({type:"SET_SELECTED_FACTOR_NAME",value:"".concat(e.provider,"-").concat(e.factorType)}),n({type:"SET_SELECTED_MFA_OBJECT",value:e}),x(null)}(e)},children:"Set Up"}):(0,i.jsx)("button",{className:"button-remove",onClick:function(){return function(e){var t=e.factor.id;(function(e,t){return a.A.delete("/services/okta/factorReset?userId=".concat(e,"&resetFactorId=").concat(t)).then(function(e){return e.data}).catch(function(e){console.log(e.message)})})(w,t).then(function(e){I(),n({type:"SET_PASS_CODE_ENABLED",value:!1}),n({type:"SET_SELECTED_FACTOR_NAME",value:""}),K("Removed MFA Successfully !!")})}(e)},children:"Remove"})]},"".concat(e.provider,"_").concat(e.factorType))},"".concat(e.provider,"_").concat(e.factorType))}),"OKTA-sms"===s&&!m&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"grid-container mfa-input",children:[(0,i.jsx)("div",{className:"mfa-input-label",children:"Enter Input for Activation Passcode"}),(0,i.jsx)("div",{children:(0,i.jsx)("input",{className:"mfa-input-text",type:"text",value:A,onChange:function(e){return O(e.target.value)}})}),(0,i.jsx)("button",{className:"mfa-submit-button",disabled:!(A.length>0),onClick:function(){G(),n({type:"SET_PASS_CODE_ENABLED",value:!0})},children:"Submit"})]})}),("OKTA-push"===s||"GOOGLE-token:software:totp"===s)&&(0,i.jsx)(S,{selectedFactorName:s,onNextClickForQRCode:function(){G()},qrCodeLink:k,setPasscodeEnabled:function(){return n({type:"SET_PASS_CODE_ENABLED",value:!0})}}),m&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"grid-container mfa-input",children:[(0,i.jsx)("div",{className:"mfa-input-label",children:"Enter Activation Passcode"}),(0,i.jsx)("div",{children:(0,i.jsx)("input",{className:"mfa-input-text",type:"text",value:v,onCh
2ange:function(e){n({type:"SET_PASS_CODE",value:e.target.value})}})}),(0,i.jsx)("button",{className:"mfa-submit-button",disabled:!((null==v?void 0:v.length)>0),onClick:function(){var e;(e={passCodeObj:{passCode:v},userId:w,factorId:T},a.A.post("/services/okta/factorActivation",e).then(function(e){return e.data}).catch(function(e){console.log(e.message)})).then(function(e){R()})},children:"Activate"})]})})]})};var S=function(e){var t=e.onNextClickForQRCode,n=e.qrCodeLink,o=e.setPasscodeEnabled,a=e.selectedFactorName,c={appName:"Okta Verify",helperInfo:"Launch Okta Verify on your mobile device and select “Add an account”. Scan the QR code to continue.",isPasscodeEnabled:!1,android:{url:"https://play.google.com/store/apps/details?id=com.okta.android.auth"},ios:{url:"https://itunes.apple.com/us/app/okta-verify/id490179405"}},s=f((0,r.useState)(""),2),l=s[0],u=s[1],d=f((0,r.useState)(c),2),p=d[0],v=d[1];return(0,r.useEffect)(function(){v("OKTA-push"===a?c:{appName:"Google Authenticator",helperInfo:'Launch Google Authenticator, tap the "+" icon, then select "Scan barcode".',isPasscodeEnabled:!0,android:{url:"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2"},ios:{url:"https://itunes.apple.com/us/app/google-authenticator/id388497605"}})},[a]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"grid-container mfa-input google-authenticator",children:[(0,i.jsx)("div",{children:(0,i.jsx)("p",{children:"Set up multi-factor authentication\n     Your company requires multi-factor authentication to add an additional layer of security when signing in to your Okta account"})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("label",{children:[(0,i.jsx)("input",{type:"radio",value:"android",checked:"android"===l,onChange:function(){return u("android")}}),"Android"]}),(0,i.jsx)("br",{})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("label",{children:[(0,i.jsx)("input",{type:"radio",value:"iPhone",checked:"iPhone"===l,onChange:function(){return u("iPhone")}}),"iPhone"]})}),(0,i.jsxs)("div",{children:["android"===l&&(0,i.jsx)("p",{children:(0,i.jsxs)("span",{className:"instructions",children:["Download",(0,i.jsxs)("a",{href:p.android.url,className:"inline-link",target:"_blank",rel:"noreferer noopener noreferrer",children:[" ",p.appName," ","from the Google Play Store"]})," ","onto your mobile device."]})}),"iPhone"===l&&(0,i.jsx)("p",{children:(0,i.jsxs)("span",{className:"instructions",children:["Download",(0,i.jsxs)("a",{href:p.ios.url,className:"inline-link",target:"_blank",rel:"noreferer noopener noreferrer",children:[" ",p.appName," ","from the App Store"]}),"onto your mobile device."]})})]}),(0,i.jsx)("div",{children:(0,i.jsx)("button",{disabled:!(l.length>0),className:"mfa-submit-button",onClick:function(){return l&&t()},children:"Next"})})]}),n&&(0,i.jsxs)("div",{className:"grid-container mfa-input google-authenticator",children:[(0,i.jsx)("div",{children:p.helperInfo}),(0,i.jsxs)("div",{className:"qrcode-wrap",children:[(0,i.jsx)("img",{"data-se":"qrcode",alt:"QR code",className:"qrcode-image",src:n.href}),(0,i.jsx)("div",{"data-se":"qrcode-success",className:"qrcode-success"}),(0,i.jsx)("div",{"data-se":"qrcode-error",className:"qrcode-error"})]}),p.isPasscodeEnabled&&(0,i.jsx)("div",{children:(0,i.jsx)("button",{className:"mfa-submit-button",onClick:function(){o()},children:"Next"})})]})]})};const g=function(){return(0,i.jsx)(o.A,{children:(0,i.jsx)(E,{})})}}}]);

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.