{"version":3,"sources":["assets/logos/payscale.svg","assets/logos/bamboohr.svg","assets/logos/ultimate.svg","assets/logos/adp.png","helpers/errors.js","clients/authorizedClient.js","clients/airshipClient.js","helpers/logger.js","clients/quantumEventServiceProxyClient.js","clients/masterAccountServiceProxyClient.js","components/LoadingSpinner.jsx","helpers/getQueryParams.js","components/SsoTheme.jsx","helpers/getAccountSource.js","components/ErrorView.jsx","bambooHr/BambooHrController.jsx","ultimate/UltimateController.jsx","helpers/withHttps.js","adp/viewStates.js","adp/views/AwaitingConsentView.jsx","adp/views/AwaitingSubscriptionView.jsx","adp/views/ConnectionReadyView.jsx","adp/employeeIdFieldMappings.js","adp/AdpController.jsx","adp/AdpSession.jsx","App.jsx","clients/payScaleSsoHandler.js","helpers/appConfig.js","index.jsx"],"names":["module","exports","HttpError","status","statusText","resultText","message","instance","Error","Object","setPrototypeOf","getPrototypeOf","this","captureStackTrace","constructor","prototype","create","value","enumerable","writable","configurable","__proto__","AuthorizedClient","accessToken","headers","Headers","append","method","url","body","bodyJson","JSON","stringify","fetch","then","res","ok","text","AirshipClient","baseUrl","hasTrailingSlash","length","masterAccountId","Promise","resolve","reject","handleRequest","json","account","catch","err","name","accountType","accountSource","accountTarget","metadata","payload","isActive","username","password","reportUrl","path","getAirshipAccount","subdomain","redirectUri","state","query","authorizationUrl","authCode","subscriptionCode","clientAccessKey","log","window","_log","logMessage","level","push","Date","toISOString","logError","QuantumEventServiceProxClient","event","hrisSystem","userId","email","info","eventType","eventInfo","MasterAccountServiceProxyClient","verified","LoadingSpinner","className","getQueryParams","location","queryString","parse","search","SsoTheme","children","logo","logoWidth","logoHeight","logoAlt","imageProps","width","height","src","PayScaleLogo","alt","getAccountSource","appConfig","productReturnUrl","labHostNames","split","mpHostNames","marketpayHostNames","hostName","URL","hostname","includes","ErrorView","href","sessionStorage","origin","pathname","toLowerCase","viewStates","BambooHrController","props","viewState","user","config","access_token","airshipClient","airshipBaseUrl","masProxyClient","quantumClient","QuantumEventServiceProxyClient","queryParams","handleSubmit","bind","handleInit","doCredentialsExist","exists","setState","code","handleBambooCallback","profile","sub","verifyUserToMasterAccount","result","setViewState","handleError","sessionStateKey","sessionStateJson","getItem","sessionState","authCodeProcessed","processAuthCode","setItem","createAirshipAccountIfNotExists","importAirshipAccount","sendHrisConnectInitEvent","doesAirshipAccountExist","createAirshipAccount","trim","isURL","isFormValid","preventDefault","uuid","replace","getBambooOidcAuthorizationUrl","saveButtonEnabled","onSubmit","disabled","loading","onChange","id","type","content","renderAccountSetup","renderAccountSetupSuccessful","BambooHRLogo","Component","UltimateController","failedSave","failedSaveMessage","failedSavePermissionFailures","saveUltimateCredential","test","data","1000","1001","1002","1003","1004","permissionFailures","handleFailedSaveError","join","renderAlertMessage","UltimateLogo","awaitingSubscription","awaitingConsent","connectionReady","error","AwaitingConsentView","target","rel","SubscriptionCodeSection","AwaitingCodeSection","AwaitingSubscriptionView","fetchSubscriptionCode","watchforSubscriberOrgOid","retryCount","getAdpSubscriptionCode","setTimeout","subscriberOrgOId","adpMarketplaceUrl","PureComponent","ConnectionReadyView","employeeIdFieldValues","employeeIdFields","label","AdpController","handleInitializeAccount","all","results","airshipAccount","credentialsExist","sendEventToQuantum","employeeIdFieldValue","employeeIdFieldName","AdpLogo","AdpSession","session","initializeSessionFromQueryString","App","Switch","Route","exact","render","PayScaleSsoHandler","opts","identityServerBaseUrl","settings","authority","client_id","redirect_uri","response_type","scope","filterProtocolClaims","loadUserInfo","mgr","UserManager","signinRedirectCallback","next","removeItem","getUser","expired","signinRedirect","handler","handleSsoCallback","signinSso","ReactDOM","document","getElementById","renderApp"],"mappings":"oGAAAA,EAAOC,QAAU,IAA0B,sC,mBCA3CD,EAAOC,QAAU,IAA0B,sC,mBCA3CD,EAAOC,QAAU,IAA0B,sC,mBCA3CD,EAAOC,QAAU,IAA0B,iC,oWCMpC,SAASC,EAAUC,EAAQC,EAAYC,GAC1C,IAAMC,EAAO,wCAAoCH,EAApC,YAA8CC,GACrDG,EAAW,IAA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AAM,IAAIC,eAAYT,G,qDAG/B,WACIxO,KAAKgP,IAAIE,yBAAyB5N,MAAK,SAAAgG,GACnC,IAAKA,EAAM,MAAM,IAAI1H,MAAM,sCAC3B,IAAMuP,EAAOrI,GAAeiC,QAxBd,YAyBVoG,GACArI,GAAesI,WA1BL,YA2BVnK,GAAS4B,KAAOsI,GAGhBlK,GAAS4B,KAAT,UAAmB5B,GAAS8B,OAA5B,U,uBAKZ,WAAa,IAAD,OACR,OAAO,IAAIhF,SAAQ,SAACC,EAASC,GACzB,EAAK+M,IACAK,UACA/N,MAAK,SAAAgG,IACGA,GAAQA,EAAKgI,SACdxI,GAAeqC,QAzCb,WA2CElE,GAAS4B,MAEb,EAAKmI,IAAIO,kBAETvN,EAAQsF,MAGfjF,OAAM,SAAAC,GAAG,OAAIL,EAAOK,a,KCnDtB4D,GAFOtC,OAAdsC,UCMFsJ,GAAU,IAAInB,GAAmB,CACnCE,sBAAuBrI,GAAUqI,wBAW1B,IAAIxM,SAAQ,SAACC,EAASC,GACQ,WAA7B2B,OAAOqB,SAAS+B,SAChBwI,GAAQC,oBAERD,GACKE,YACApO,MAAK,SAAAgG,GAAI,OAAItF,EAAQsF,MACrBjF,OAAM,SAAAC,GAAG,OAAIL,EAAOK,SAKzBhB,MAAK,SAAAgG,GAAI,OApBrB,SAAmBA,GACfqI,IAASvB,OACL,kBAAC,GAAD,CAAK9G,KAAMA,EAAMC,OAAQrB,KACzB0J,SAASC,eAAe,SAiBPC,CAAUxI,Q","file":"static/js/main.9d535069.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/payscale.94ec028d.svg\";","module.exports = __webpack_public_path__ + \"static/media/bamboohr.28a62c9e.svg\";","module.exports = __webpack_public_path__ + \"static/media/ultimate.99db0491.svg\";","module.exports = __webpack_public_path__ + \"static/media/adp.987b96b8.png\";","// Note: special prototype magic is required to extend the Error class when\r\n// using Babel. Otherwise the `instanceof` operator does not work\r\n//\r\n// See https://stackoverflow.com/a/43595019\r\n\r\n// eslint-disable-next-line import/prefer-default-export\r\nexport function HttpError(status, statusText, resultText) {\r\n const message = `Invalid response from server: ${status} ${statusText}`;\r\n const instance = new Error(message);\r\n instance.status = status;\r\n instance.statusText = statusText;\r\n instance.resultText = resultText;\r\n Object.setPrototypeOf(instance, Object.getPrototypeOf(this));\r\n if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, this.constructor);\r\n }\r\n return instance;\r\n}\r\n\r\nHttpError.prototype = Object.create(Error.prototype, {\r\n constructor: {\r\n value: Error,\r\n enumerable: false,\r\n writable: true,\r\n configurable: true\r\n }\r\n});\r\n\r\nif (Object.setPrototypeOf) {\r\n Object.setPrototypeOf(HttpError, Error);\r\n} else {\r\n HttpError.__proto__ = Error; // eslint-disable-line no-proto\r\n}\r\n","import { HttpError } from '../helpers/errors';\r\n\r\nexport default class AuthorizedClient {\r\n constructor(accessToken) {\r\n if (!accessToken) throw new Error('accessToken is null or undefined');\r\n const headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('Authorization', `Bearer ${accessToken}`);\r\n this.headers = headers;\r\n }\r\n\r\n handleRequest(method, url, body) {\r\n const bodyJson = body ? JSON.stringify(body) : null;\r\n return fetch(url, {\r\n body: bodyJson,\r\n headers: this.headers,\r\n method\r\n }).then(res => {\r\n if (res.ok) return res;\r\n throw new HttpError(res.status, res.statusText, res.text());\r\n });\r\n }\r\n}\r\n","import AuthorizedClient from './authorizedClient';\r\n\r\nexport default class AirshipClient extends AuthorizedClient {\r\n constructor(accessToken, baseUrl) {\r\n super(accessToken);\r\n if (!baseUrl) throw new Error('baseUrl is null or undefined');\r\n // Ensure baseUrl has a trailing slash\r\n const hasTrailingSlash = baseUrl[baseUrl.length - 1] === '/';\r\n this.baseUrl = hasTrailingSlash ? baseUrl : `${baseUrl}/`;\r\n }\r\n\r\n getAirshipAccount(masterAccountId) {\r\n return new Promise((resolve, reject) =>\r\n this.handleRequest(\r\n 'GET',\r\n `${this.baseUrl}api/v1/account/${masterAccountId}`\r\n )\r\n .then(res => res.json())\r\n .then(account => resolve(account))\r\n .catch(err => {\r\n if (err.status === 404) resolve(null);\r\n else reject(err);\r\n })\r\n );\r\n }\r\n\r\n createAirshipAccount(\r\n masterAccountId,\r\n name,\r\n accountType,\r\n accountSource,\r\n accountTarget,\r\n metadata = null\r\n ) {\r\n const payload = {\r\n masterAccountId,\r\n name,\r\n accountType,\r\n accountSource,\r\n accountTarget,\r\n isActive: true,\r\n metadata\r\n };\r\n return this.handleRequest(\r\n 'POST',\r\n `${this.baseUrl}api/v1/account`,\r\n payload\r\n );\r\n }\r\n\r\n importAirshipAccount(masterAccountId) {\r\n return this.handleRequest('POST', `${this.baseUrl}api/v1/import`, {\r\n masterAccountId\r\n });\r\n }\r\n\r\n processWorkdayCredentials(masterAccountId, username, password, reportUrl) {\r\n const path = `${this.baseUrl}api/v1/Credentials/${masterAccountId}/workday`;\r\n const payload = {\r\n reportUrl,\r\n username,\r\n password\r\n };\r\n return this.handleRequest('POST', path, payload);\r\n }\r\n\r\n doesAirshipAccountExist(masterAccountId) {\r\n return this.getAirshipAccount(masterAccountId).then(\r\n account => account !== null\r\n );\r\n }\r\n\r\n doCredentialsExist(masterAccountId) {\r\n const path = `${this.baseUrl}api/v1/credentials/${masterAccountId}`;\r\n return new Promise((resolve, reject) => {\r\n this.handleRequest('GET', path)\r\n .then(() => {\r\n resolve(true);\r\n })\r\n .catch(err => {\r\n if (err.status === 404) resolve(false);\r\n else reject(err);\r\n });\r\n });\r\n }\r\n\r\n getBambooOidcAuthorizationUrl(subdomain, redirectUri, state) {\r\n const path = `${this.baseUrl}api/v1/bamboo-oidc/authorizationurl`;\r\n const query = `?subdomain=${subdomain}&redirectUri=${redirectUri}&state=${state}`;\r\n return this.handleRequest('GET', path + query)\r\n .then(res => res.json())\r\n .then(res => res.authorizationUrl);\r\n }\r\n\r\n processAuthCode(subdomain, redirectUri, authCode, masterAccountId) {\r\n const path = `${this.baseUrl}api/v1/bamboo-oidc/processauthcode`;\r\n const payload = {\r\n subdomain,\r\n redirectUri,\r\n authCode,\r\n masterAccountId\r\n };\r\n return this.handleRequest('POST', path, payload);\r\n }\r\n\r\n getAdpSubscriptionCode(masterAccountId) {\r\n const path = `${this.baseUrl}api/v1/adp/subscription/code/${masterAccountId}`;\r\n return this.handleRequest('POST', path)\r\n .then(res => res.json())\r\n .then(res => res.subscriptionCode);\r\n }\r\n\r\n saveUltimateCredential(\r\n masterAccountId,\r\n username,\r\n password,\r\n clientAccessKey,\r\n baseUrl\r\n ) {\r\n const path = `${this.baseUrl}api/v1/ultimate-credentials/save`;\r\n const payload = {\r\n username,\r\n password,\r\n clientAccessKey,\r\n baseUrl,\r\n masterAccountId\r\n };\r\n return this.handleRequest('POST', path, payload);\r\n }\r\n}\r\n","// eslint-disable-next-line no-underscore-dangle, no-multi-assign\r\nconst log = (window._log = window._log || []);\r\n\r\nconst logMessage = (level, message) => {\r\n log.push(`${new Date().toISOString()} :: ${level} :: ${message}`);\r\n};\r\n\r\nexport const logError = message => {\r\n logMessage('error', message);\r\n};\r\n\r\nexport const logInformation = message => {\r\n logMessage('info', message);\r\n};\r\n","import AuthorizedClient from './authorizedClient';\nimport { logError } from '../helpers/logger';\n\nexport default class QuantumEventServiceProxClient extends AuthorizedClient {\n sendHrisConnectInitEvent(\n event,\n hrisSystem,\n masterAccountId,\n userId,\n email\n ) {\n const info = {\n hrisSystem,\n userId,\n email\n };\n const eventInfo = JSON.stringify(info);\n const eventType = event;\n const payload = {\n eventType,\n eventInfo\n };\n\n return new Promise(resolve => {\n this.handleRequest(\n 'POST',\n `/proxy/qes/account/${masterAccountId}/InitEvent`,\n payload\n )\n .then(() => {\n resolve(true);\n })\n .catch(err => {\n logError('Could not log event to quantum' + err);\n resolve(true);\n });\n });\n }\n}\n","import AuthorizedClient from './authorizedClient';\r\n\r\n// Client for the backend proxy to MasterAccountService\r\n\r\nexport default class MasterAccountServiceProxyClient extends AuthorizedClient {\r\n verifyUserToMasterAccount(userId, masterAccountId) {\r\n return this.handleRequest(\r\n 'GET',\r\n `/proxy/mas/account/${masterAccountId}/users/${userId}`\r\n )\r\n .then(res => res.json())\r\n .then(body => body.verified === true);\r\n }\r\n}\r\n","import React from 'react';\r\nimport './LoadingSpinner.scss';\r\n\r\nconst LoadingSpinner = () => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default LoadingSpinner;\r\n","import queryString from 'query-string';\r\n\r\n// Why separate this out into its own module? Makes mocking easier\r\n// since mocking the `window` global object is difficult, while\r\n// mocking this module is easy\r\n\r\nconst getQueryParams = () => {\r\n const { location } = window;\r\n const params = queryString.parse(location.search);\r\n return params;\r\n};\r\n\r\nexport default getQueryParams;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport './SsoTheme.scss';\r\nimport PayScaleLogo from '../assets/logos/payscale.svg';\r\n\r\nconst SsoTheme = ({ children, logo, logoWidth, logoHeight, logoAlt }) => {\r\n const imageProps = {\r\n ...(logoWidth ? { width: logoWidth } : {}),\r\n ...(logoHeight ? { height: logoHeight } : {}),\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n {logo ? (\r\n <>\r\n
\r\n {logoAlt}\r\n \r\n ) : null}\r\n
\r\n
{children}
\r\n
\r\n );\r\n};\r\n\r\nSsoTheme.propTypes = {\r\n children: PropTypes.node.isRequired,\r\n logo: PropTypes.any,\r\n logoWidth: PropTypes.number,\r\n logoHeight: PropTypes.number,\r\n logoAlt: PropTypes.string\r\n};\r\n\r\nexport default SsoTheme;\r\n","const getAccountSource = (appConfig, productReturnUrl) => {\n const labHostNames = appConfig.labHostNames.split(',');\n const mpHostNames = appConfig.marketpayHostNames.split(',');\n const hostName = new URL(productReturnUrl).hostname;\n if (labHostNames.includes(hostName)) {\n return 'InsightLab';\n } else if (mpHostNames.includes(hostName)) {\n return 'Marketpay';\n }\n return 'Undefined';\n};\n\nexport default getAccountSource;\n","import React from 'react';\r\nimport './ErrorView.scss';\r\n\r\nconst ErrorView = ({ productReturnUrl }) => (\r\n
\r\n

Oh no! An error has occurred.

\r\n \r\n Go Back\r\n \r\n
\r\n);\r\n\r\nexport default ErrorView;\r\n","import React, { Component } from 'react';\r\nimport uuid from 'uuid/v4';\r\nimport AirshipClient from '../clients/airshipClient';\r\nimport QuantumEventServiceProxyClient from '../clients/quantumEventServiceProxyClient';\r\nimport MasterAccountServiceProxyClient from '../clients/masterAccountServiceProxyClient';\r\nimport { logError } from '../helpers/logger';\r\nimport LoadingSpinner from '../components/LoadingSpinner';\r\nimport getQueryParams from '../helpers/getQueryParams';\r\nimport SsoTheme from '../components/SsoTheme';\r\nimport getAccountSource from '../helpers/getAccountSource';\r\nimport ErrorView from '../components/ErrorView';\r\nimport Input from '@payscale/design/lib/input';\r\nimport FormGroup from '@payscale/design/lib/form-group';\r\nimport './BambooHrController.scss';\r\nimport isURL from 'validator/es/lib/isURL';\r\nimport BambooHRLogo from '../assets/logos/bamboohr.svg';\r\n\r\nconst { sessionStorage, location } = window;\r\n\r\nconst redirectUri = `${location.origin}${location.pathname}`.toLowerCase();\r\n\r\nconst viewStates = {\r\n loading: 'loading',\r\n accountSetup: 'accountSetup',\r\n accountSetupSuccessful: 'accountSetupSuccessful',\r\n error: 'error'\r\n};\r\n\r\nexport default class BambooHrController extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n masterAccountId: null,\r\n productReturnUrl: null,\r\n subdomain: '',\r\n viewState: viewStates.loading\r\n };\r\n\r\n const { user, config } = this.props;\r\n const accessToken = user.access_token;\r\n this.airshipClient = new AirshipClient(\r\n accessToken,\r\n config.airshipBaseUrl\r\n );\r\n this.masProxyClient = new MasterAccountServiceProxyClient(accessToken);\r\n this.quantumClient = new QuantumEventServiceProxyClient(accessToken);\r\n\r\n this.queryParams = getQueryParams();\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n this.handleInit();\r\n }\r\n\r\n setViewState() {\r\n const { queryParams } = this;\r\n const { masterAccountId } = queryParams;\r\n return this.airshipClient\r\n .doCredentialsExist(masterAccountId)\r\n .then(exists => {\r\n // If the credentials already exist in Airship, skip to success view\r\n const viewState = exists\r\n ? viewStates.accountSetupSuccessful\r\n : viewStates.accountSetup;\r\n this.setState({ viewState });\r\n });\r\n }\r\n\r\n handleInit() {\r\n const { queryParams } = this;\r\n const isBambooCallback = queryParams.state && queryParams.code;\r\n if (isBambooCallback) {\r\n this.handleBambooCallback();\r\n return;\r\n }\r\n\r\n const { masterAccountId, productReturnUrl } = queryParams;\r\n if (!masterAccountId)\r\n throw new Error('Expected masterAccountId query parameter');\r\n if (!productReturnUrl)\r\n throw new Error('Expected productReturnUrl query parameter');\r\n this.setState({ masterAccountId, productReturnUrl });\r\n\r\n const { user } = this.props;\r\n // \"sub\" is used as user id\r\n const userId = user.profile.sub;\r\n\r\n this.masProxyClient\r\n .verifyUserToMasterAccount(userId, masterAccountId)\r\n .then(result => {\r\n if (result !== true)\r\n throw new Error(\r\n `User ${userId} is not verified to MasterAccount ${masterAccountId}`\r\n );\r\n })\r\n .then(() => this.setViewState())\r\n .catch(err => this.handleError(err));\r\n }\r\n\r\n handleBambooCallback() {\r\n const sessionStateKey = this.queryParams.state;\r\n const sessionStateJson = sessionStorage.getItem(sessionStateKey);\r\n\r\n if (!sessionStateJson) {\r\n throw new Error(`Session not found under key ${sessionStateKey}`);\r\n }\r\n\r\n // Re-hydrate state based on stored sessionState\r\n const sessionState = JSON.parse(sessionStateJson);\r\n this.setState({\r\n masterAccountId: sessionState.masterAccountId,\r\n productReturnUrl: sessionState.productReturnUrl,\r\n subdomain: sessionState.subdomain\r\n });\r\n // Don't replay auth codes that have already been used; assume the\r\n // account was created\r\n if (sessionState.authCodeProcessed) {\r\n this.setState({ viewState: viewStates.accountSetupSuccessful });\r\n return;\r\n }\r\n\r\n const { user } = this.props;\r\n const authCode = this.queryParams.code;\r\n if (!authCode) throw new Error('Expected auth code in query string!');\r\n this.airshipClient\r\n .processAuthCode(\r\n sessionState.subdomain,\r\n redirectUri,\r\n authCode,\r\n sessionState.masterAccountId\r\n )\r\n .then(() => {\r\n sessionState.authCodeProcessed = true;\r\n sessionStorage.setItem(\r\n sessionStateKey,\r\n JSON.stringify(sessionState)\r\n );\r\n })\r\n .then(() =>\r\n this.createAirshipAccountIfNotExists(\r\n sessionState.masterAccountId\r\n )\r\n )\r\n .then(() =>\r\n this.airshipClient.importAirshipAccount(\r\n sessionState.masterAccountId\r\n )\r\n )\r\n .then(() =>\r\n this.quantumClient.sendHrisConnectInitEvent(\r\n 'HrisConnect Bamboo Init Event',\r\n 'Bamboo',\r\n sessionState.masterAccountId,\r\n sessionState.userId,\r\n user.profile.email\r\n )\r\n )\r\n .then(() =>\r\n this.setState({ viewState: viewStates.accountSetupSuccessful })\r\n )\r\n .catch(err => this.handleError(err));\r\n }\r\n\r\n createAirshipAccountIfNotExists(masterAccountId) {\r\n return this.airshipClient\r\n .doesAirshipAccountExist(masterAccountId)\r\n .then(exists => {\r\n if (exists) {\r\n return Promise.resolve();\r\n }\r\n const accountSource = getAccountSource(\r\n this.props.config,\r\n this.state.productReturnUrl\r\n );\r\n return this.airshipClient.createAirshipAccount(\r\n masterAccountId,\r\n null,\r\n 'Bamboo',\r\n accountSource,\r\n 'NoTarget'\r\n );\r\n });\r\n }\r\n\r\n isFormValid() {\r\n return (\r\n this.state.subdomain.trim() !== '' &&\r\n isURL(`${this.state.subdomain.trim()}.bamboohr.com`)\r\n );\r\n }\r\n\r\n handleSubmit(event) {\r\n if (!this.isFormValid()) return;\r\n event.preventDefault();\r\n this.setState({ viewState: viewStates.loading });\r\n const { state } = this;\r\n const sessionState = {\r\n masterAccountId: state.masterAccountId,\r\n subdomain: state.subdomain,\r\n productReturnUrl: state.productReturnUrl\r\n };\r\n const sessionStateKey = uuid().replace(/-/g, '');\r\n sessionStorage.setItem(sessionStateKey, JSON.stringify(sessionState));\r\n this.airshipClient\r\n .getBambooOidcAuthorizationUrl(\r\n state.subdomain,\r\n redirectUri,\r\n sessionStateKey\r\n )\r\n .then(url => {\r\n window.location = url;\r\n })\r\n .catch(err => this.handleError(err));\r\n }\r\n\r\n handleError(err) {\r\n logError(err);\r\n this.setState({ viewState: viewStates.error });\r\n }\r\n\r\n renderAccountSetup() {\r\n const saveButtonEnabled = this.isFormValid();\r\n\r\n return (\r\n
\r\n

Let's connect directly to BambooHR.

\r\n \r\n \r\n \r\n this.setState({ subdomain: value })\r\n }\r\n />\r\n \r\n .bamboohr.com\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n renderAccountSetupSuccessful() {\r\n return (\r\n
\r\n

\r\n You've connected to BambooHR! Email your PayScale API\r\n contact to finalize your connection.\r\n

\r\n \r\n Back to Insight Lab\r\n \r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { viewState, productReturnUrl } = this.state;\r\n let content;\r\n switch (viewState) {\r\n case viewStates.loading:\r\n content = ;\r\n break;\r\n case viewStates.accountSetup:\r\n content = this.renderAccountSetup();\r\n break;\r\n case viewStates.accountSetupSuccessful:\r\n content = this.renderAccountSetupSuccessful();\r\n break;\r\n case viewStates.error:\r\n default:\r\n content = ;\r\n }\r\n\r\n return (\r\n \r\n {content}\r\n \r\n );\r\n }\r\n}\r\n","import React, { Component } from 'react';\nimport AirshipClient from '../clients/airshipClient';\nimport MasterAccountServiceProxyClient from '../clients/masterAccountServiceProxyClient';\nimport QuantumEventServiceProxyClient from '../clients/quantumEventServiceProxyClient';\nimport LoadingSpinner from '../components/LoadingSpinner';\nimport {\n logError,\n withHttps,\n getQueryParams,\n getAccountSource\n} from '../helpers';\nimport SsoTheme from '../components/SsoTheme';\nimport isURL from 'validator/es/lib/isURL';\nimport './UltimateController.scss';\nimport Input from '@payscale/design/lib/input';\nimport FormGroup from '@payscale/design/lib/form-group';\nimport Alert from '@payscale/design/lib/alert';\nimport ErrorView from '../components/ErrorView';\nimport UltimateLogo from '../assets/logos/ultimate.svg';\n\nconst viewStates = {\n loading: 'loading',\n accountSetup: 'accountSetup',\n accountSetupSuccessful: 'accountSetupSuccessful',\n error: 'error'\n};\n\nexport default class UltimateController extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n masterAccountId: null,\n productReturnUrl: null,\n username: '',\n password: '',\n clientAccessKey: '',\n baseUrl: '',\n viewState: viewStates.loading,\n failedSave: false,\n failedSaveMessage: '',\n failedSavePermissionFailures: null\n };\n\n const { user, config } = this.props;\n const accessToken = user.access_token;\n this.airshipClient = new AirshipClient(\n accessToken,\n config.airshipBaseUrl\n );\n this.masProxyClient = new MasterAccountServiceProxyClient(accessToken);\n this.quantumClient = new QuantumEventServiceProxyClient(accessToken);\n\n this.queryParams = getQueryParams();\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidMount() {\n this.handleInit();\n }\n\n setViewState() {\n const { queryParams } = this;\n const { masterAccountId } = queryParams;\n\n return this.airshipClient\n .doCredentialsExist(masterAccountId)\n .then(exists => {\n const viewState = exists\n ? viewStates.accountSetupSuccessful\n : viewStates.accountSetup;\n this.setState({ viewState });\n });\n }\n\n handleInit() {\n const { queryParams } = this;\n const { masterAccountId, productReturnUrl } = queryParams;\n if (!masterAccountId)\n throw new Error('Expected masterAccountId query parameter');\n if (!productReturnUrl)\n throw new Error('Expected productReturnUrl query parameter');\n this.setState({ masterAccountId, productReturnUrl });\n const { user } = this.props;\n const userId = user.profile.sub;\n this.masProxyClient\n .verifyUserToMasterAccount(userId, masterAccountId)\n .then(result => {\n if (result !== true)\n throw new Error(\n `User ${userId} is not verified to MasterAccount ${masterAccountId}`\n );\n })\n .then(() => this.setViewState())\n .catch(err => this.handleError(err));\n }\n\n isFormValid() {\n return (\n this.state.username.trim() !== '' &&\n this.state.password.trim() !== '' &&\n this.state.clientAccessKey.trim() !== '' &&\n this.state.baseUrl.trim() !== '' &&\n isURL(`${this.state.baseUrl.trim()}.ultipro.com`)\n );\n }\n\n handleSubmit(event) {\n if (!this.isFormValid()) return;\n event.preventDefault();\n this.setState({ viewState: viewStates.loading });\n\n const { state } = this;\n const { user } = this.props;\n const userId = user.profile.sub;\n\n this.airshipClient\n .saveUltimateCredential(\n state.masterAccountId,\n state.username,\n state.password,\n state.clientAccessKey,\n withHttps(`${state.baseUrl}.ultipro.com`)\n )\n .then(() =>\n this.createAirshipAccountIfNotExists(state.masterAccountId)\n )\n .then(() =>\n this.airshipClient.importAirshipAccount(state.masterAccountId)\n )\n .then(() =>\n this.quantumClient.sendHrisConnectInitEvent(\n 'HrisConnect Ultimate Init Event',\n 'Ultimate',\n state.masterAccountId,\n userId,\n user.profile.email\n )\n )\n .then(() =>\n this.setState({ viewState: viewStates.accountSetupSuccessful })\n )\n .catch(err => this.handleError(err));\n }\n\n createAirshipAccountIfNotExists(masterAccountId) {\n return this.airshipClient\n .doesAirshipAccountExist(masterAccountId)\n .then(exists => {\n if (exists) {\n return Promise.resolve();\n }\n const accountSource = getAccountSource(\n this.props.config,\n this.state.productReturnUrl\n );\n return this.airshipClient.createAirshipAccount(\n masterAccountId,\n null,\n 'Ultimate',\n accountSource,\n 'NoTarget'\n );\n });\n }\n\n handleFailedSaveError(err) {\n err.resultText\n .then(text => {\n var data = JSON.parse(text);\n var message = {\n 1000: 'The UltiPro URL appears to be incorrect.',\n 1001: 'Please make sure the UltiPro URL and the API Key are correct.',\n 1002: 'The UltiPro Username and UltiPro Password combination was declined.',\n 1003: 'The UltiPro URL is unreachable.',\n 1004: 'The following required permissions are not granted:'\n }[data.code];\n if (!message) {\n throw err;\n }\n\n this.setState({\n viewState: viewStates.accountSetup,\n failedSave: true,\n failedSaveMessage: message,\n failedSavePermissionFailures: data.permissionFailures\n ? data.permissionFailures\n : null\n });\n })\n .catch(() => this.setState({ viewState: viewStates.error }));\n }\n\n handleError(err) {\n logError(err);\n if (err.status === 400 && err.resultText) {\n this.handleFailedSaveError(err);\n return;\n }\n\n this.setState({ viewState: viewStates.error });\n }\n\n renderAlertMessage() {\n const { failedSaveMessage } = this.state;\n const { failedSavePermissionFailures } = this.state;\n\n if (failedSavePermissionFailures) {\n return `${failedSaveMessage} ${failedSavePermissionFailures.join(\n ', '\n )}`;\n } else {\n return failedSaveMessage;\n }\n }\n\n renderAccountSetup() {\n const saveButtonEnabled = this.isFormValid();\n\n return (\n
\n {this.state.failedSave ? (\n \n ) : (\n

Let's connect directly to UltiPro.

\n )}\n \n
\n \n \n this.setState({ username: value })\n }\n />\n \n \n \n this.setState({ password: value })\n }\n />\n \n
\n
\n \n \n this.setState({\n clientAccessKey: value\n })\n }\n />\n \n \n \n this.setState({ baseUrl: value })\n }\n />\n \n .ultipro.com\n \n \n
\n \n \n
\n );\n }\n\n renderAccountSetupSuccessful() {\n const { productReturnUrl } = this.state;\n return (\n
\n

\n You've connected to UltiPro! Email your PayScale API\n contact to finalize your connection.\n

\n \n Back to Insight Lab\n \n
\n );\n }\n\n render() {\n const { viewState, productReturnUrl } = this.state;\n let content;\n switch (viewState) {\n case viewStates.loading:\n content = ;\n break;\n case viewStates.accountSetup:\n content = this.renderAccountSetup();\n break;\n case viewStates.accountSetupSuccessful:\n content = this.renderAccountSetupSuccessful();\n break;\n case viewStates.error:\n default:\n content = ;\n }\n\n return (\n \n {content}\n \n );\n }\n}\n","export const withHttps = url =>\n /^https?:\\/\\//i.test(url) ? url : `https://${url}`;\n","const viewStates = {\r\n loading: 'loading',\r\n awaitingSubscription: 'awaitingSubscription',\r\n awaitingConsent: 'awaitingConsent',\r\n connectionReady: 'connectionReady',\r\n error: 'error'\r\n};\r\n\r\nexport default viewStates;\r\n","import React from 'react';\r\nimport './AwaitingConsentView.scss';\r\n\r\nconst AwaitingConsentView = () => (\r\n
\r\n

You're almost done!

\r\n

\r\n Finally, we need to obtain consent to access your ADP data. If\r\n you've already given consent, please check back soon.\r\n

\r\n
\r\n \r\n Give consent via ADP\r\n \r\n
\r\n
\r\n);\r\n\r\nexport default AwaitingConsentView;\r\n","import React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport CopyToClipboard from 'react-copy-to-clipboard';\r\nimport viewStates from '../viewStates';\r\nimport AwaitingConsentView from './AwaitingConsentView';\r\nimport './AwaitingSubscriptionView.scss';\r\n\r\nconst SubscriptionCodeSection = ({ subscriptionCode }) => (\r\n

\r\n {subscriptionCode}\r\n \r\n \r\n \r\n

\r\n);\r\n\r\nconst AwaitingCodeSection = ({ message }) => (\r\n

\r\n {message}\r\n

\r\n);\r\n\r\nexport default class AwaitingSubscriptionView extends PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.state = { subscriptionCode: null };\r\n }\r\n\r\n componentDidMount() {\r\n this.fetchSubscriptionCode();\r\n this.watchforSubscriberOrgOid();\r\n }\r\n\r\n fetchSubscriptionCode(retryCount = 5) {\r\n const { airshipClient, masterAccountId } = this.props;\r\n airshipClient\r\n .getAdpSubscriptionCode(masterAccountId)\r\n .then(subscriptionCode => this.setState({ subscriptionCode }))\r\n .catch(err => {\r\n if (retryCount > 0) {\r\n window.setTimeout(\r\n () => this.fetchSubscriptionCode(retryCount - 1),\r\n 1000\r\n );\r\n }\r\n });\r\n }\r\n\r\n watchforSubscriberOrgOid() {\r\n const { airshipClient, masterAccountId } = this.props;\r\n window.setTimeout(() => {\r\n let viewState = viewStates.awaitingConsent;\r\n airshipClient.getAirshipAccount(masterAccountId).then(account => {\r\n if (account && account.metadata.subscriberOrgOId) {\r\n this.setState({ viewState });\r\n } else {\r\n this.watchforSubscriberOrgOid();\r\n }\r\n });\r\n }, 5000);\r\n }\r\n\r\n render() {\r\n const { subscriptionCode, viewState } = this.state;\r\n switch (viewState) {\r\n case viewStates.awaitingConsent:\r\n return ;\r\n case viewStates.awaitingSubscription:\r\n default:\r\n return (\r\n
\r\n

Let's connect directly to ADP.

\r\n

\r\n First, you must subscribe to the PayScale app in the\r\n ADP Marketplace.\r\n

\r\n

\r\n When completing the subscription, you will be\r\n prompted to enter a subscription code. Here is your\r\n subscription code:\r\n

\r\n {subscriptionCode ? (\r\n \r\n ) : (\r\n \r\n )}\r\n

\r\n Please, keep this page open. It will refresh\r\n automatically when you have completed your\r\n subscription.\r\n

\r\n
\r\n \r\n Go to ADP Marketplace\r\n \r\n
\r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nAwaitingSubscriptionView.propTypes = {\r\n adpMarketplaceUrl: PropTypes.string.isRequired,\r\n masterAccountId: PropTypes.string.isRequired,\r\n airshipClient: PropTypes.object.isRequired // eslint-disable-line react/forbid-prop-types\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport './ConnectionReadyView.scss';\r\n\r\nconst ConnectionReadyView = ({ productReturnUrl }) => (\r\n
\r\n

\r\n You've connected to ADP! Email your PayScale API contact to\r\n finalize your connection.\r\n

\r\n \r\n Back to Insight Lab\r\n \r\n
\r\n);\r\n\r\nConnectionReadyView.propTypes = {\r\n productReturnUrl: PropTypes.string.isRequired\r\n};\r\n\r\nexport default ConnectionReadyView;\r\n","const employeeIdFieldValues = {\r\n positionId: 'PositionId',\r\n workerId: 'WorkerId',\r\n payrollFileNumber: 'PayrollFileNumber'\r\n};\r\n\r\nconst employeeIdFields = {\r\n workforceNowPositionId: 'workforceNowPositionId',\r\n workforceNowWorkerId: 'workforceNowWorkerId',\r\n workforceNowPayrollFileNumber: 'workforceNowPayrollFileNumber',\r\n vantageWorkerId: 'vantageWorkerId',\r\n vantagePayrollFileNumber: 'vantagePayrollFileNumber'\r\n};\r\n\r\nconst employeeIdFieldMappings = {\r\n [employeeIdFields.workforceNowPositionId]: {\r\n value: employeeIdFieldValues.positionId,\r\n label: 'Position ID (ex. XYZ000123)'\r\n },\r\n [employeeIdFields.workforceNowWorkerId]: {\r\n value: employeeIdFieldValues.workerId,\r\n label: 'Associate ID (ex. 0XYZ12YZ3)'\r\n },\r\n [employeeIdFields.workforceNowPayrollFileNumber]: {\r\n value: employeeIdFieldValues.payrollFileNumber,\r\n label: 'File Number (ex. 000123)'\r\n },\r\n [employeeIdFields.vantageWorkerId]: {\r\n value: employeeIdFieldValues.workerId,\r\n label: 'Employee ID'\r\n },\r\n [employeeIdFields.vantagePayrollFileNumber]: {\r\n value: employeeIdFieldValues.payrollFileNumber,\r\n label: 'File Number'\r\n }\r\n};\r\n\r\nexport { employeeIdFields, employeeIdFieldValues, employeeIdFieldMappings };\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport AirshipClient from '../clients/airshipClient';\r\nimport MasterAccountServiceProxyClient from '../clients/masterAccountServiceProxyClient';\r\nimport QuantumEventServiceProxyClient from '../clients/quantumEventServiceProxyClient';\r\nimport { logError } from '../helpers/logger';\r\nimport {\r\n AwaitingSubscriptionView,\r\n AwaitingConsentView,\r\n ConnectionReadyView\r\n} from './views';\r\nimport viewStates from './viewStates';\r\nimport SsoTheme from '../components/SsoTheme';\r\nimport { employeeIdFieldValues } from './employeeIdFieldMappings';\r\nimport getAccountSource from '../helpers/getAccountSource';\r\nimport LoadingSpinner from '../components/LoadingSpinner';\r\nimport ErrorView from '../components/ErrorView';\r\nimport AdpLogo from '../assets/logos/adp.png';\r\n\r\nexport default class AdpController extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n viewState: viewStates.loading\r\n };\r\n\r\n const { user, config } = this.props;\r\n const accessToken = user.access_token;\r\n\r\n this.masProxyClient = new MasterAccountServiceProxyClient(accessToken);\r\n this.airshipClient = new AirshipClient(\r\n accessToken,\r\n config.airshipBaseUrl\r\n );\r\n this.quantumClient = new QuantumEventServiceProxyClient(accessToken);\r\n this.handleError = this.handleError.bind(this);\r\n this.handleInitializeAccount = this.handleInitializeAccount.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n this.verifyUserToMasterAccount()\r\n .then(() => this.setViewState())\r\n .catch(this.handleError);\r\n }\r\n\r\n setViewState() {\r\n const { masterAccountId } = this.props;\r\n\r\n const getAirshipAccount = this.airshipClient.getAirshipAccount(\r\n masterAccountId\r\n );\r\n const doCredentialsExist = this.airshipClient.doCredentialsExist(\r\n masterAccountId\r\n );\r\n Promise.all([getAirshipAccount, doCredentialsExist])\r\n .then(results => {\r\n const airshipAccount = results[0];\r\n const credentialsExist = results[1];\r\n\r\n let viewState;\r\n if (airshipAccount) {\r\n const { subscriberOrgOId } = airshipAccount.metadata;\r\n if (!subscriberOrgOId) {\r\n viewState = viewStates.awaitingSubscription;\r\n } else {\r\n if (credentialsExist === true) {\r\n this.sendEventToQuantum();\r\n viewState = viewStates.connectionReady;\r\n } else {\r\n viewState = viewStates.awaitingConsent;\r\n }\r\n }\r\n } else {\r\n this.handleInitializeAccount(\r\n employeeIdFieldValues.workerId\r\n );\r\n viewState = viewStates.awaitingSubscription;\r\n }\r\n\r\n this.setState({ viewState });\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n verifyUserToMasterAccount() {\r\n const { user, masterAccountId } = this.props;\r\n // \"sub\" is used as user id\r\n const userId = user.profile.sub;\r\n return this.masProxyClient\r\n .verifyUserToMasterAccount(userId, masterAccountId)\r\n .then(verified => {\r\n if (!verified) {\r\n throw new Error(\r\n `User ${userId} is not verified to MasterAccount ${masterAccountId}`\r\n );\r\n }\r\n });\r\n }\r\n\r\n sendEventToQuantum() {\r\n const { user, masterAccountId } = this.props;\r\n const userId = user.profile.sub;\r\n\r\n this.quantumClient.sendHrisConnectInitEvent(\r\n 'HrisConnect ADP Init Event',\r\n 'ADP',\r\n masterAccountId,\r\n userId,\r\n user.profile.email\r\n );\r\n }\r\n\r\n handleError(err) {\r\n logError(err);\r\n this.setState({ viewState: viewStates.error });\r\n }\r\n\r\n handleInitializeAccount(employeeIdFieldValue) {\r\n const { masterAccountId, productReturnUrl, config } = this.props;\r\n\r\n const accountSource = getAccountSource(config, productReturnUrl);\r\n this.airshipClient\r\n .createAirshipAccount(\r\n masterAccountId,\r\n null,\r\n 'Adp',\r\n accountSource,\r\n 'NoTarget',\r\n { employeeIdFieldName: employeeIdFieldValue }\r\n )\r\n .then(() =>\r\n this.setState({\r\n viewState: viewStates.awaitingSubscription\r\n })\r\n )\r\n .catch(error => {\r\n this.handleError(error);\r\n });\r\n }\r\n\r\n render() {\r\n const { viewState } = this.state;\r\n\r\n let content;\r\n switch (viewState) {\r\n case viewStates.loading:\r\n content = ;\r\n break;\r\n case viewStates.awaitingSubscription:\r\n content = (\r\n \r\n );\r\n break;\r\n case viewStates.awaitingConsent:\r\n content = ;\r\n break;\r\n case viewStates.connectionReady:\r\n content = (\r\n \r\n );\r\n break;\r\n case viewStates.error:\r\n default:\r\n content = (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {content}\r\n \r\n );\r\n }\r\n}\r\n\r\nAdpController.propTypes = {\r\n masterAccountId: PropTypes.string.isRequired,\r\n productReturnUrl: PropTypes.string.isRequired,\r\n config: PropTypes.object.isRequired,\r\n user: PropTypes.object.isRequired\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport AdpController from './AdpController';\r\nimport getQueryParams from '../helpers/getQueryParams';\r\n\r\nexport default class AdpSession extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n session: null\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.initializeSessionFromQueryString();\r\n }\r\n\r\n initializeSessionFromQueryString() {\r\n const queryParams = getQueryParams();\r\n const { masterAccountId, productReturnUrl } = queryParams;\r\n if (!masterAccountId)\r\n throw new Error('Expected masterAccountId query parameter');\r\n if (!productReturnUrl)\r\n throw new Error('Expected productReturnUrl query parameter');\r\n const session = { masterAccountId, productReturnUrl };\r\n this.setState({ session });\r\n }\r\n\r\n render() {\r\n const { session } = this.state;\r\n if (!session) return null;\r\n\r\n const { masterAccountId, productReturnUrl } = session;\r\n\r\n const { config, user } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nAdpSession.propTypes = {\r\n config: PropTypes.object.isRequired,\r\n user: PropTypes.object.isRequired\r\n};\r\n","import React from 'react';\nimport { BrowserRouter as Router, Route, Switch } from 'react-router-dom';\nimport BambooHrController from './bambooHr/BambooHrController';\nimport UltimateController from './ultimate/UltimateController';\nimport AdpSession from './adp/AdpSession';\n\nconst App = ({ config, user }) => (\n \n \n }\n />\n (\n \n )}\n />\n (\n \n )}\n />\n \n \n);\n\nexport default App;\n","import { UserManager } from 'oidc-client';\r\n\r\nconst { sessionStorage, location } = window;\r\nconst nextUriSessionKey = 'sso-next';\r\n\r\nexport default class PayScaleSsoHandler {\r\n constructor(opts) {\r\n const { identityServerBaseUrl } = opts;\r\n if (!identityServerBaseUrl)\r\n throw new Error('identityServerBaseUrl is null or undefined');\r\n\r\n const settings = {\r\n authority: identityServerBaseUrl,\r\n client_id: 'hrisconnect',\r\n redirect_uri: `${location.origin}/login`,\r\n response_type: 'id_token token',\r\n scope: 'openid email airship account quantum',\r\n filterProtocolClaims: true,\r\n loadUserInfo: true\r\n };\r\n\r\n this.mgr = new UserManager(settings);\r\n }\r\n\r\n handleSsoCallback() {\r\n this.mgr.signinRedirectCallback().then(user => {\r\n if (!user) throw new Error('No user after processing callback!');\r\n const next = sessionStorage.getItem(nextUriSessionKey);\r\n if (next) {\r\n sessionStorage.removeItem(nextUriSessionKey);\r\n location.href = next;\r\n } else {\r\n // redirect to root and remove hash\r\n location.href = `${location.origin}/`;\r\n }\r\n });\r\n }\r\n\r\n signinSso() {\r\n return new Promise((resolve, reject) => {\r\n this.mgr\r\n .getUser()\r\n .then(user => {\r\n if (!user || user.expired) {\r\n sessionStorage.setItem(\r\n nextUriSessionKey,\r\n location.href\r\n );\r\n this.mgr.signinRedirect();\r\n } else {\r\n resolve(user);\r\n }\r\n })\r\n .catch(err => reject(err));\r\n });\r\n }\r\n}\r\n","const { appConfig } = window;\r\n\r\nexport default appConfig;\r\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport PayScaleSsoHandler from './clients/payScaleSsoHandler';\nimport appConfig from './helpers/appConfig';\n\nconst handler = new PayScaleSsoHandler({\n identityServerBaseUrl: appConfig.identityServerBaseUrl\n});\n\nfunction renderApp(user) {\n ReactDOM.render(\n ,\n document.getElementById('root')\n );\n}\n\nfunction handleSso() {\n return new Promise((resolve, reject) => {\n if (window.location.pathname === '/login') {\n handler.handleSsoCallback();\n } else {\n handler\n .signinSso()\n .then(user => resolve(user))\n .catch(err => reject(err));\n }\n });\n}\n\nhandleSso().then(user => renderApp(user));\n"],"sourceRoot":""}