{"version":3,"sources":["utils/Configuration.ts","utils/BasePath.ts","utils/AssetPath.ts","assets/images/user.svg","layouts/LoginLayout.tsx","hooks/NotificationsContext.ts","services/Api.ts","services/Client.ts","services/ResetPassword.ts","Routes.ts","components/FixedTextField.tsx","views/ResetPassword/ResetPasswordStep1.tsx","utils/IdentityToken.ts","views/ResetPassword/ResetPasswordStep2.tsx","components/FingerTouchIcon.tsx","services/RegisterDevice.ts","views/DeviceRegistration/RegisterSecurityKey.tsx","assets/images/googleplay-badge.svg","assets/images/applestore-badge.svg","components/AppStoreBadges.tsx","constants.ts","views/DeviceRegistration/RegisterOneTimePassword.tsx","services/FirstFactor.ts","hooks/RedirectionURL.ts","views/LoginPortal/FirstFactor/FirstFactorForm.tsx","components/PushNotificationIcon.tsx","models/Methods.ts","hooks/IntermittentClass.ts","components/PieChartIcon.tsx","views/LoginPortal/SecondFactor/MethodSelectionDialog.tsx","components/InformationIcon.tsx","views/LoginPortal/SecondFactor/MethodContainer.tsx","components/SuccessIcon.tsx","views/LoginPortal/Authenticated.tsx","services/SecurityKey.ts","hooks/Mounted.ts","services/State.ts","views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx","components/LinearProgressBar.tsx","components/FailureIcon.tsx","views/LoginPortal/SecondFactor/IconWithContext.tsx","hooks/Timer.ts","views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx","components/TimerIcon.tsx","views/LoginPortal/SecondFactor/OTPDial.tsx","services/OneTimePassword.ts","views/LoginPortal/SecondFactor/PushNotificationMethod.tsx","services/PushNotification.ts","services/UserPreferences.ts","views/LoginPortal/SecondFactor/SecondFactorForm.tsx","hooks/RemoteCall.ts","views/LoadingPage/LoadingPage.tsx","services/Configuration.ts","views/LoginPortal/AuthenticatedView/AuthenticatedView.tsx","views/LoginPortal/LoginPortal.tsx","hooks/State.ts","hooks/UserInfo.ts","hooks/Configuration.ts","components/ColoredSnackbarContent.tsx","components/NotificationBar.tsx","services/SignOut.ts","views/LoginPortal/SignOut/SignOut.tsx","App.tsx","serviceWorker.ts","index.tsx","components/FingerTouchIcon.module.css","components/PushNotificationIcon.module.css"],"names":["getEmbeddedVariable","variableName","value","document","body","getAttribute","Error","getBasePath","__webpack_public_path__","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","d","_ref3","_ref4","_ref5","_ref6","_ref7","_ref8","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","SvgUser","_ref","svgRef","title","titleId","props","id","x","y","viewBox","style","enableBackground","xmlSpace","ref","ForwardRef","LoginLayout","useStyles","Grid","className","root","container","spacing","alignItems","justify","Container","maxWidth","rootContainer","item","xs","icon","Typography","variant","children","showBrand","Link","href","poweredBy","makeStyles","theme","minHeight","textAlign","paddingLeft","paddingRight","margin","width","fontSize","color","grey","defaultOptions","NotificationsContext","createContext","notification","setNotification","useNotifications","useNotificationsProps","useContext","notificationBuilder","level","message","timeout","createInfoNotification","useCallback","createSuccessNotification","createWarnNotification","createErrorNotification","isActive","resetNotification","basePath","FirstFactorPath","InitiateTOTPRegistrationPath","CompleteTOTPRegistrationPath","InitiateU2FRegistrationPath","CompleteU2FRegistrationStep1Path","CompleteU2FRegistrationStep2Path","InitiateU2FSignInPath","CompleteU2FSignInPath","CompletePushNotificationSignInPath","CompleteTOTPSignInPath","InitiateResetPasswordPath","CompleteResetPasswordPath","ResetPasswordPath","LogoutPath","StatePath","UserInfoPath","UserInfo2FAMethodPath","ConfigurationPath","toData","resp","data","hasServiceError","errResp","toErrorResponse","status","PostWithOptionalResponse","path","a","axios","post","res","Post","Get","get","initiateResetPasswordProcess","username","completeResetPasswordProcess","token","resetPassword","newPassword","password","FirstFactorRoute","AuthenticatedRoute","SecondFactorRoute","SecondFactorU2FRoute","SecondFactorTOTPRoute","SecondFactorPushRoute","ResetPasswordStep1Route","LogoutRoute","FixedTextField","TextField","InputLabelProps","classes","label","inputProps","autoCapitalize","backgroundColor","palette","background","default","ResetPasswordStep1","useState","setUsername","error","setError","history","useHistory","doInitiateResetPasswordProcess","fullWidth","onChange","e","onKeyPress","ev","preventDefault","Button","onClick","push","marginTop","marginBottom","extractIdentityToken","locationSearch","queryParams","queryString","parse","ResetPasswordStep2","location","useLocation","formDisabled","setFormDisabled","password1","setPassword1","password2","setPassword2","errorPassword1","setErrorPassword1","errorPassword2","setErrorPassword2","processToken","search","completeProcess","console","useEffect","doResetPassword","setTimeout","type","disabled","classnames","name","FingerTouchIcon","shakingClass","animated","shaking","undefined","strong","size","height","hand","wave","initiateTOTPRegistrationProcess","completeTOTPRegistrationProcess","initiateU2FRegistrationProcess","completeU2FRegistrationProcessStep1","completeU2FRegistrationProcessStep2","response","RegisterSecurityKey","setRegistrationInProgress","handleBackClick","registerStep1","registerRequests","r","appId","challenge","version","u2fApi","register","registerResponse","instruction","paddingTop","paddingBottom","AppStoreBadges","targetBlank","iconSize","googlePlayLink","src","GooglePlay","alt","appleStoreLink","AppleStore","GoogleAuthenticator","RegisterOneTimePassword","secretURL","setSecretURL","secretBase32","setSecretBase32","hasErrored","setHasErrored","isLoading","setIsLoading","completeRegistrationProcess","secret","otpauth_url","base32_secret","qrcodeFuzzyStyle","fuzzy","googleAuthenticator","googleAuthenticatorText","googleAuthenticatorBadges","qrcodeContainer","qrcode","CircularProgress","loader","failureIcon","faTimesCircle","display","doneButton","filter","typography","position","top","left","red","postFirstFactor","rememberMe","targetURL","keepMeLoggedIn","useRedirectionURL","FirstFactorForm","redirectionURL","setRememberMe","usernameError","setUsernameError","setPassword","passwordError","setPasswordError","usernameRef","useRef","passwordRef","current","focus","clearTimeout","handleSignIn","onAuthenticationStart","onAuthenticationSuccess","redirect","onAuthenticationFailure","inputRef","required","v","onFocus","leftAlign","actionRow","flexEnd","FormControlLabel","control","Checkbox","checked","component","resetLink","flexDirection","cursor","flexGrow","justifyContent","rightAlign","verticalAlign","SecondFactorMethod","PushNotificationIcon","wiggleClass","classname","activeMilliseconds","inactiveMillisecond","startMillisecond","currentClass","setCurrentClass","firstTime","setFirstTime","useIntermittentClass","wiggle","PieChartIcon","maxProgress","cx","cy","fill","stroke","strokeWidth","strokeDasharray","progress","transform","MethodSelectionDialog","useTheme","pieChartIcon","primary","main","Dialog","open","onClose","DialogContent","methods","has","TOTP","MethodItem","method","U2F","u2fSupported","MobilePush","DialogActions","buttonRoot","State","InformationIcon","faInfoCircle","SuccessIcon","faCheckCircle","Authenticated","iconContainer","flex","DefaultMethodContainer","stateClass","state","ALREADY_AUTHENTICATED","NOT_REGISTERED","NotRegisteredContainer","METHOD","explanation","containerFlex","onRegisterClick","flexWrap","alignContent","MethodContainer","initiateU2FSignin","completeU2FSignin","signResponse","useIsMountedRef","isMountedRef","AuthenticationLevel","LinearProgressBar","progressRoot","transition","LinearProgress","bar1Determinate","FailureIcon","IconWithContext","context","getState","SecurityKeyMethod","WaitTouch","setState","mounted","timeoutMs","startDate","setStartDate","percent","setPercent","trigger","Date","clear","intervalNode","setInterval","p","getTime","clearInterval","useTimer","signInTimeout","timerPercent","triggerTimer","onSignInSuccess","onSignInError","onSignInErrorCallback","onSignInSuccessCallback","doInitiateSignIn","registered","authenticationLevel","TwoFactor","signRequest","signRequests","registeredKeys","keyHandle","sign","SigninInProgress","Failure","methodState","MethodContainerState","timer","onRetryClick","Icon","progressBarStyle","touch","failure","TimerIcon","radius","timeProgress","setTimeProgress","initialValue","period","interval","OTPDial","dial","otpInput","shouldAutoFocus","passcode","numInputs","isDisabled","InProgress","Success","inputStyle","otpDigitInput","inputError","padding","marginLeft","marginRight","borderRadius","border","completeTOTPSignIn","OneTimePasswordMethod","setPasscode","Idle","signInFunc","passcodeStr","totp_period","completePushNotificationSignIn","PushNotificationMethod","SignInInProgress","toEnum","toString","getUserPreferences","setPreferred2FAMethod","SecondFactorForm","methodSelectionOpen","setMethodSelectionOpen","registrationInProgress","setU2fSupported","ensureSupport","then","initiateRegistration","initiateRegistrationFunc","handleMethodSelected","onMethodChanged","userInfo","display_name","configuration","available_methods","SignOutRoute","methodContainer","exact","has_totp","err","has_u2f","to","useRemoteCall","fn","deps","setData","inProgress","setInProgress","fnCallback","LoadingPage","getConfiguration","config","Set","map","AuthenticatedView","mainContainer","LoginPortal","firstFactorDisabled","setFirstFactorDisabled","fetchState","fetchStateError","fetchUserInfo","fetchUserInfoError","fetchConfiguration","fetchConfigurationError","url","authentication_level","OneFactor","Unauthenticated","redirectionSuffix","encodeURIComponent","second_factor_enabled","handleAuthSuccess","window","firstFactorReady","pathname","ComponentOrLoading","ready","variantIcon","success","CheckCircleIcon","warning","WarningIcon","ErrorIcon","info","InfoIcon","ColoredSnackbarContent","others","SnackbarContent","iconVariant","green","dark","amber","opacity","NotificationBar","tmpNotification","setTmpNotification","shouldSnackbarBeOpen","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","onExited","signOut","SignOut","timedOut","setTimedOut","doSignOut","typo","faConfig","autoAddCss","App","Provider","basename","Boolean","hostname","match","ReactDOM","render","getElementById","navigator","serviceWorker","registration","unregister","module","exports"],"mappings":"oIAAO,SAASA,EAAoBC,GAClC,IAAMC,EAAQC,SAASC,KAAKC,aAAd,eAAmCJ,IACjD,GAAc,OAAVC,EACF,MAAM,IAAII,MAAJ,aAAgBL,EAAhB,gCAGR,OAAOC,ECJF,SAASK,IACZ,OAAOP,EAAoB,YCD/BQ,IAA0B,IAEJ,KAAlBD,MACFC,IAA0BD,IAAgB,K,iICL5C,SAASE,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,IAA2BS,MAAMC,KAAMR,WAEhT,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,cAAC,IAAD,CAAOvX,KrD7Ba,yBqD6BmBuX,OAAK,EAA5C,SACI,cAAC,GAAD,MAEJ,cAAC,IAAD,CAAOvX,KrD/BiB,8BqD+BmBuX,OAAK,EAAhD,SACI,cAAC,GAAD,MAEJ,cAAC,IAAD,CAAOvX,KAAMsB,GAAaiW,OAAK,EAA/B,SACI,cAAC,GAAD,MAEJ,cAAC,IAAD,CAAOvX,KAAMe,GAAb,SACI,cAAC,GAAD,CACI6I,W9DzCmB,SAAtC1S,EAAoB,c8D0CD0J,c9DtCsB,SAAzC1J,EAAoB,qB8DwCT,cAAC,IAAD,CAAO8I,KAAK,IAAZ,SACI,cAAC,IAAD,CAAU2X,GAAI5W,gBC3ClBsb,QACW,cAA7B1C,OAAOhW,SAAS2Y,UAEe,UAA7B3C,OAAOhW,SAAS2Y,UAEhB3C,OAAOhW,SAAS2Y,SAASC,MACvB,2DCXNC,IAASC,OAAO,cAAC,GAAD,IAASplB,SAASqlB,eAAe,SDkI3C,kBAAmBC,WACrBA,UAAUC,cAAc7C,MAAMnD,MAAK,SAAAiG,GACjCA,EAAaC,iB,mBE1InBC,EAAOC,QAAU,CAAC,KAAO,8BAA8B,OAAS,gCAAgC,QAAU,mC,mBCA1GD,EAAOC,QAAU,CAAC,OAAS,wC","file":"static/js/main.60e05329.chunk.js","sourcesContent":["export function getEmbeddedVariable(variableName: string) {\n const value = document.body.getAttribute(`data-${variableName}`);\n if (value === null) {\n throw new Error(`No ${variableName} embedded variable detected`);\n }\n\n return value;\n}\n\nexport function getRememberMe() {\n return getEmbeddedVariable(\"rememberme\") === \"true\";\n}\n\nexport function getResetPassword() {\n return getEmbeddedVariable(\"resetpassword\") === \"true\";\n}","import { getEmbeddedVariable } from \"./Configuration\";\n\nexport function getBasePath() {\n return getEmbeddedVariable(\"basepath\");\n}","import { getBasePath } from \"./BasePath\";\n\n__webpack_public_path__ = \"/\"\n\nif (getBasePath() !== \"\") {\n __webpack_public_path__ = getBasePath() + \"/\"\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55,27.5C55,12.337,42.663,0,27.5,0S0,12.337,0,27.5c0,8.009,3.444,15.228,8.926,20.258l-0.026,0.023l0.892,0.752 c0.058,0.049,0.121,0.089,0.179,0.137c0.474,0.393,0.965,0.766,1.465,1.127c0.162,0.117,0.324,0.234,0.489,0.348 c0.534,0.368,1.082,0.717,1.642,1.048c0.122,0.072,0.245,0.142,0.368,0.212c0.613,0.349,1.239,0.678,1.88,0.98 c0.047,0.022,0.095,0.042,0.142,0.064c2.089,0.971,4.319,1.684,6.651,2.105c0.061,0.011,0.122,0.022,0.184,0.033 c0.724,0.125,1.456,0.225,2.197,0.292c0.09,0.008,0.18,0.013,0.271,0.021C25.998,54.961,26.744,55,27.5,55 c0.749,0,1.488-0.039,2.222-0.098c0.093-0.008,0.186-0.013,0.279-0.021c0.735-0.067,1.461-0.164,2.178-0.287 c0.062-0.011,0.125-0.022,0.187-0.034c2.297-0.412,4.495-1.109,6.557-2.055c0.076-0.035,0.153-0.068,0.229-0.104 c0.617-0.29,1.22-0.603,1.811-0.936c0.147-0.083,0.293-0.167,0.439-0.253c0.538-0.317,1.067-0.648,1.581-1 c0.185-0.126,0.366-0.259,0.549-0.391c0.439-0.316,0.87-0.642,1.289-0.983c0.093-0.075,0.193-0.14,0.284-0.217l0.915-0.764 l-0.027-0.023C51.523,42.802,55,35.55,55,27.5z M2,27.5C2,13.439,13.439,2,27.5,2S53,13.439,53,27.5 c0,7.577-3.325,14.389-8.589,19.063c-0.294-0.203-0.59-0.385-0.893-0.537l-8.467-4.233c-0.76-0.38-1.232-1.144-1.232-1.993v-2.957 c0.196-0.242,0.403-0.516,0.617-0.817c1.096-1.548,1.975-3.27,2.616-5.123c1.267-0.602,2.085-1.864,2.085-3.289v-3.545 c0-0.867-0.318-1.708-0.887-2.369v-4.667c0.052-0.52,0.236-3.448-1.883-5.864C34.524,9.065,31.541,8,27.5,8 s-7.024,1.065-8.867,3.168c-2.119,2.416-1.935,5.346-1.883,5.864v4.667c-0.568,0.661-0.887,1.502-0.887,2.369v3.545 c0,1.101,0.494,2.128,1.34,2.821c0.81,3.173,2.477,5.575,3.093,6.389v2.894c0,0.816-0.445,1.566-1.162,1.958l-7.907,4.313 c-0.252,0.137-0.502,0.297-0.752,0.476C5.276,41.792,2,35.022,2,27.5z\"\n});\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref5 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref6 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref7 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref8 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref9 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref10 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref11 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref12 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref13 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref14 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref15 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref16 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref17 = /*#__PURE__*/React.createElement(\"g\", null);\n\nfunction SvgUser(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 55 55\",\n style: {\n enableBackground: \"new 0 0 55 55\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgUser);\nexport default __webpack_public_path__ + \"static/media/user.130bceb2.svg\";\nexport { ForwardRef as ReactComponent };","import React, { ReactNode } from \"react\";\nimport { Grid, makeStyles, Container, Typography, Link } from \"@material-ui/core\";\nimport { ReactComponent as UserSvg } from \"../assets/images/user.svg\";\nimport { grey } from \"@material-ui/core/colors\";\n\n\nexport interface Props {\n id?: string;\n children?: ReactNode;\n title: string;\n showBrand?: boolean;\n}\n\nconst LoginLayout = function (props: Props) {\n const style = useStyles();\n return (\n \n \n \n \n \n \n \n \n {props.title}\n \n \n \n {props.children}\n \n {props.showBrand ? \n \n Powered by Authelia\n \n \n : null\n }\n \n \n \n );\n}\n\nexport default LoginLayout\n\nconst useStyles = makeStyles(theme => ({\n root: {\n minHeight: '90vh',\n textAlign: \"center\",\n // marginTop: theme.spacing(10),\n },\n rootContainer: {\n paddingLeft: 32,\n paddingRight: 32,\n },\n title: {},\n icon: {\n margin: theme.spacing(),\n width: \"64px\",\n },\n body: {},\n poweredBy: {\n fontSize: \"0.7em\",\n color: grey[500],\n }\n}))","import { Level } from \"../components/ColoredSnackbarContent\";\nimport { useCallback, createContext, useContext } from \"react\";\nimport { Notification } from \"../models/Notifications\";\n\nconst defaultOptions = {\n timeout: 5,\n}\n\ninterface NotificationContextProps {\n notification: Notification | null;\n setNotification: (n: Notification | null) => void;\n}\n\nconst NotificationsContext = createContext(\n { notification: null, setNotification: () => { } });\n\nexport default NotificationsContext;\n\n\nexport function useNotifications() {\n let useNotificationsProps = useContext(NotificationsContext);\n\n const notificationBuilder = (level: Level) => {\n return (message: string, timeout?: number) => {\n useNotificationsProps.setNotification({\n level, message,\n timeout: timeout ? timeout : defaultOptions.timeout\n });\n }\n }\n\n const resetNotification = () => useNotificationsProps.setNotification(null);\n /* eslint-disable react-hooks/exhaustive-deps */\n const createInfoNotification = useCallback(notificationBuilder(\"info\"), []);\n const createSuccessNotification = useCallback(notificationBuilder(\"success\"), []);\n const createWarnNotification = useCallback(notificationBuilder(\"warning\"), []);\n const createErrorNotification = useCallback(notificationBuilder(\"error\"), []);\n /* eslint-enable react-hooks/exhaustive-deps */\n const isActive = useNotificationsProps.notification !== null;\n\n\n return {\n notification: useNotificationsProps.notification,\n resetNotification,\n createInfoNotification,\n createSuccessNotification,\n createWarnNotification,\n createErrorNotification,\n isActive\n }\n}","import { AxiosResponse } from \"axios\";\nimport { getBasePath } from \"../utils/BasePath\";\n\nconst basePath = getBasePath();\n\nexport const FirstFactorPath = basePath + \"/api/firstfactor\";\nexport const InitiateTOTPRegistrationPath = basePath + \"/api/secondfactor/totp/identity/start\";\nexport const CompleteTOTPRegistrationPath = basePath + \"/api/secondfactor/totp/identity/finish\";\n\nexport const InitiateU2FRegistrationPath = basePath + \"/api/secondfactor/u2f/identity/start\";\nexport const CompleteU2FRegistrationStep1Path = basePath + \"/api/secondfactor/u2f/identity/finish\";\nexport const CompleteU2FRegistrationStep2Path = basePath + \"/api/secondfactor/u2f/register\";\n\nexport const InitiateU2FSignInPath = basePath + \"/api/secondfactor/u2f/sign_request\";\nexport const CompleteU2FSignInPath = basePath + \"/api/secondfactor/u2f/sign\";\n\nexport const CompletePushNotificationSignInPath = basePath + \"/api/secondfactor/duo\"\nexport const CompleteTOTPSignInPath = basePath + \"/api/secondfactor/totp\"\n\nexport const InitiateResetPasswordPath = basePath + \"/api/reset-password/identity/start\";\nexport const CompleteResetPasswordPath = basePath + \"/api/reset-password/identity/finish\";\n// Do the password reset during completion.\nexport const ResetPasswordPath = basePath + \"/api/reset-password\"\n\nexport const LogoutPath = basePath + \"/api/logout\";\nexport const StatePath = basePath + \"/api/state\";\nexport const UserInfoPath = basePath + \"/api/user/info\";\nexport const UserInfo2FAMethodPath = basePath + \"/api/user/info/2fa_method\";\n\nexport const ConfigurationPath = basePath + \"/api/configuration\";\n\nexport interface ErrorResponse {\n status: \"KO\";\n message: string;\n}\n\nexport interface Response {\n status: \"OK\";\n data: T;\n}\n\nexport type ServiceResponse = Response | ErrorResponse;\n\nfunction toErrorResponse(resp: AxiosResponse>): ErrorResponse | undefined {\n if (resp.data && \"status\" in resp.data && resp.data[\"status\"] === \"KO\") {\n return resp.data as ErrorResponse;\n }\n return undefined;\n}\n\nexport function toData(resp: AxiosResponse>): T | undefined {\n if (resp.data && \"status\" in resp.data && resp.data[\"status\"] === \"OK\") {\n return resp.data.data as T;\n }\n return undefined\n}\n\nexport function hasServiceError(resp: AxiosResponse>) {\n const errResp = toErrorResponse(resp);\n if (errResp && errResp.status === \"KO\") {\n return true;\n }\n return false;\n}","import axios from \"axios\";\nimport { ServiceResponse, hasServiceError, toData } from \"./Api\";\n\nexport async function PostWithOptionalResponse(path: string, body?: any) {\n const res = await axios.post>(path, body);\n\n if (res.status !== 200 || hasServiceError(res)) {\n throw new Error(`Failed POST to ${path}. Code: ${res.status}.`);\n }\n return toData(res);\n}\n\nexport async function Post(path: string, body?: any) {\n const res = await PostWithOptionalResponse(path, body);\n if (!res) {\n throw new Error(\"unexpected type of response\");\n }\n return res;\n}\n\nexport async function Get(path: string): Promise {\n const res = await axios.get>(path);\n\n if (res.status !== 200 || hasServiceError(res)) {\n throw new Error(`Failed GET from ${path}. Code: ${res.status}.`);\n }\n\n const d = toData(res);\n if (!d) {\n throw new Error(\"unexpected type of response\");\n }\n return d;\n}","import { InitiateResetPasswordPath, CompleteResetPasswordPath, ResetPasswordPath } from \"./Api\";\nimport { PostWithOptionalResponse } from \"./Client\";\n\n\nexport async function initiateResetPasswordProcess(username: string) {\n return PostWithOptionalResponse(InitiateResetPasswordPath, { username });\n}\n\nexport async function completeResetPasswordProcess(token: string) {\n return PostWithOptionalResponse(CompleteResetPasswordPath, { token });\n}\n\nexport async function resetPassword(newPassword: string) {\n return PostWithOptionalResponse(ResetPasswordPath, { password: newPassword });\n}","\nexport const FirstFactorRoute = \"/\";\nexport const AuthenticatedRoute = \"/authenticated\";\n\nexport const SecondFactorRoute = \"/2fa\";\nexport const SecondFactorU2FRoute = \"/2fa/security-key\";\nexport const SecondFactorTOTPRoute = \"/2fa/one-time-password\";\nexport const SecondFactorPushRoute = \"/2fa/push-notification\";\n\nexport const ResetPasswordStep1Route = \"/reset-password/step1\";\nexport const ResetPasswordStep2Route = \"/reset-password/step2\";\nexport const RegisterSecurityKeyRoute = \"/security-key/register\";\nexport const RegisterOneTimePasswordRoute = \"/one-time-password/register\";\nexport const LogoutRoute = \"/logout\";","import React from \"react\";\nimport TextField, { TextFieldProps } from \"@material-ui/core/TextField\";\nimport { makeStyles } from \"@material-ui/core\";\n\n/**\n * This component fixes outlined TextField\n * https://github.com/mui-org/material-ui/issues/14530#issuecomment-463576879\n * \n * @param props the TextField props\n */\nconst FixedTextField = function (props: TextFieldProps) {\n const style = useStyles();\n return (\n \n {props.children}\n \n );\n}\n\nexport default FixedTextField\n\nconst useStyles = makeStyles(theme => ({\n label: {\n backgroundColor: theme.palette.background.default,\n paddingLeft: theme.spacing(0.1),\n paddingRight: theme.spacing(0.1),\n }\n}));","import React, { useState } from \"react\";\nimport LoginLayout from \"../../layouts/LoginLayout\";\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\nimport { useNotifications } from \"../../hooks/NotificationsContext\";\nimport { useHistory } from \"react-router\";\nimport { initiateResetPasswordProcess } from \"../../services/ResetPassword\";\nimport { FirstFactorRoute } from \"../../Routes\";\nimport FixedTextField from \"../../components/FixedTextField\";\n\nconst ResetPasswordStep1 = function () {\n const style = useStyles();\n const [username, setUsername] = useState(\"\");\n const [error, setError] = useState(false);\n const { createInfoNotification, createErrorNotification } = useNotifications();\n const history = useHistory();\n\n const doInitiateResetPasswordProcess = async () => {\n if (username === \"\") {\n setError(true);\n return;\n }\n\n try {\n await initiateResetPasswordProcess(username);\n createInfoNotification(\"An email has been sent to your address to complete the process.\");\n } catch (err) {\n createErrorNotification(\"There was an issue initiating the password reset process.\");\n }\n }\n\n const handleResetClick = () => {\n doInitiateResetPasswordProcess();\n }\n\n const handleCancelClick = () => {\n history.push(FirstFactorRoute);\n }\n\n return (\n \n \n \n setUsername(e.target.value)}\n onKeyPress={(ev) => {\n if (ev.key === 'Enter') {\n doInitiateResetPasswordProcess();\n ev.preventDefault();\n }\n }} />\n \n \n Reset\n \n \n Cancel\n \n \n \n )\n}\n\nexport default ResetPasswordStep1\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n}))","import queryString from \"query-string\";\n\nexport function extractIdentityToken(locationSearch: string) {\n const queryParams = queryString.parse(locationSearch);\n return (queryParams && \"token\" in queryParams)\n ? queryParams[\"token\"] as string\n : null;\n}","import React, { useState, useCallback, useEffect } from \"react\";\nimport LoginLayout from \"../../layouts/LoginLayout\";\nimport classnames from \"classnames\";\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\nimport { useNotifications } from \"../../hooks/NotificationsContext\";\nimport { useHistory, useLocation } from \"react-router\";\nimport { completeResetPasswordProcess, resetPassword } from \"../../services/ResetPassword\";\nimport { FirstFactorRoute } from \"../../Routes\";\nimport { extractIdentityToken } from \"../../utils/IdentityToken\";\nimport FixedTextField from \"../../components/FixedTextField\";\n\nconst ResetPasswordStep2 = function () {\n const style = useStyles();\n const location = useLocation();\n const [formDisabled, setFormDisabled] = useState(true);\n const [password1, setPassword1] = useState(\"\");\n const [password2, setPassword2] = useState(\"\");\n const [errorPassword1, setErrorPassword1] = useState(false);\n const [errorPassword2, setErrorPassword2] = useState(false);\n const { createSuccessNotification, createErrorNotification } = useNotifications();\n const history = useHistory();\n // Get the token from the query param to give it back to the API when requesting\n // the secret for OTP.\n const processToken = extractIdentityToken(location.search);\n\n const completeProcess = useCallback(async () => {\n if (!processToken) {\n setFormDisabled(true);\n createErrorNotification(\"No verification token provided\");\n return;\n }\n\n try {\n setFormDisabled(true);\n await completeResetPasswordProcess(processToken);\n setFormDisabled(false);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was an issue completing the process. \" +\n \"The verification token might have expired.\");\n setFormDisabled(true);\n }\n }, [processToken, createErrorNotification]);\n\n useEffect(() => {\n completeProcess();\n }, [completeProcess]);\n\n const doResetPassword = async () => {\n if (password1 === \"\" || password2 === \"\") {\n if (password1 === \"\") {\n setErrorPassword1(true);\n }\n if (password2 === \"\") {\n setErrorPassword2(true);\n }\n return\n }\n if (password1 !== password2) {\n setErrorPassword1(true);\n setErrorPassword2(true)\n createErrorNotification(\"Passwords do not match.\");\n return;\n }\n\n try {\n await resetPassword(password1);\n createSuccessNotification(\"Password has been reset.\");\n setTimeout(() => history.push(FirstFactorRoute), 1500);\n setFormDisabled(true);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was an issue resetting the password.\");\n }\n }\n\n const handleResetClick = () =>\n doResetPassword();\n\n const handleCancelClick = () =>\n history.push(FirstFactorRoute);\n\n return (\n \n \n \n setPassword1(e.target.value)}\n error={errorPassword1}\n className={classnames(style.fullWidth)} />\n \n \n setPassword2(e.target.value)}\n error={errorPassword2}\n onKeyPress={(ev) => {\n if (ev.key === 'Enter') {\n doResetPassword();\n ev.preventDefault();\n }\n }}\n className={classnames(style.fullWidth)} />\n \n \n Reset\n \n \n Cancel\n \n \n \n )\n}\n\nexport default ResetPasswordStep2\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n fullWidth: {\n width: \"100%\",\n }\n}))","import React from \"react\";\nimport style from \"./FingerTouchIcon.module.css\";\nimport classnames from \"classnames\";\n\nexport interface Props {\n\tsize: number;\n\n\tanimated?: boolean;\n\tstrong?: boolean;\n}\n\nconst FingerTouchIcon = function (props: Props) {\n\tconst shakingClass = (props.animated) ? style.shaking : undefined;\n\tconst strong = (props.strong) ? style.strong : undefined;\n\n return (\n \n\t\t\t\n\t\t\t\n \n )\n}\n\nexport default FingerTouchIcon","import {\n InitiateTOTPRegistrationPath, CompleteTOTPRegistrationPath,\n InitiateU2FRegistrationPath, CompleteU2FRegistrationStep1Path,\n CompleteU2FRegistrationStep2Path\n} from \"./Api\";\nimport U2fApi from \"u2f-api\";\nimport { Post, PostWithOptionalResponse } from \"./Client\";\n\nexport async function initiateTOTPRegistrationProcess() {\n await PostWithOptionalResponse(InitiateTOTPRegistrationPath);\n}\n\ninterface CompleteTOTPRegistrationResponse {\n base32_secret: string;\n otpauth_url: string;\n}\n\nexport async function completeTOTPRegistrationProcess(processToken: string) {\n return Post(\n CompleteTOTPRegistrationPath, { token: processToken });\n}\n\n\nexport async function initiateU2FRegistrationProcess() {\n return PostWithOptionalResponse(InitiateU2FRegistrationPath);\n}\n\ninterface U2RRegistrationStep1Response {\n appId: string,\n registerRequests: [{\n version: string,\n challenge: string,\n }]\n}\n\nexport async function completeU2FRegistrationProcessStep1(processToken: string) {\n return Post(\n CompleteU2FRegistrationStep1Path, { token: processToken });\n}\n\nexport async function completeU2FRegistrationProcessStep2(response: U2fApi.RegisterResponse) {\n return PostWithOptionalResponse(CompleteU2FRegistrationStep2Path, response);\n}","import React, { useState, useEffect, useCallback } from \"react\";\nimport LoginLayout from \"../../layouts/LoginLayout\";\nimport FingerTouchIcon from \"../../components/FingerTouchIcon\";\nimport { makeStyles, Typography, Button } from \"@material-ui/core\";\nimport { useHistory, useLocation } from \"react-router\";\nimport { FirstFactorPath } from \"../../services/Api\";\nimport { extractIdentityToken } from \"../../utils/IdentityToken\";\nimport { completeU2FRegistrationProcessStep1, completeU2FRegistrationProcessStep2 } from \"../../services/RegisterDevice\";\nimport { useNotifications } from \"../../hooks/NotificationsContext\";\nimport u2fApi from \"u2f-api\";\n\nconst RegisterSecurityKey = function () {\n const style = useStyles();\n const history = useHistory();\n const location = useLocation();\n const { createErrorNotification } = useNotifications();\n const [, setRegistrationInProgress] = useState(false);\n\n const processToken = extractIdentityToken(location.search);\n\n\n const handleBackClick = () => {\n history.push(FirstFactorPath);\n }\n\n const registerStep1 = useCallback(async () => {\n if (!processToken) {\n return;\n }\n try {\n setRegistrationInProgress(true);\n const res = await completeU2FRegistrationProcessStep1(processToken);\n const registerRequests: u2fApi.RegisterRequest[] = [];\n for (var i in res.registerRequests) {\n const r = res.registerRequests[i];\n registerRequests.push({\n appId: res.appId,\n challenge: r.challenge,\n version: r.version,\n })\n }\n const registerResponse = await u2fApi.register(registerRequests, [], 60);\n await completeU2FRegistrationProcessStep2(registerResponse);\n setRegistrationInProgress(false);\n history.push(FirstFactorPath);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"Failed to register your security key. \" +\n \"The identity verification process might have timed out.\");\n }\n }, [processToken, createErrorNotification, history]);\n\n useEffect(() => {\n registerStep1();\n }, [registerStep1]);\n\n return (\n \n
\n \n
\n Touch the token on your security key\n \n \n
\n )\n}\n\nexport default RegisterSecurityKey\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n instruction: {\n paddingBottom: theme.spacing(4),\n }\n}))","export default __webpack_public_path__ + \"static/media/googleplay-badge.6577102c.svg\";","export default __webpack_public_path__ + \"static/media/applestore-badge.15f01eef.svg\";","import React from \"react\";\nimport GooglePlay from \"../assets/images/googleplay-badge.svg\";\nimport AppleStore from \"../assets/images/applestore-badge.svg\";\nimport { Link } from \"@material-ui/core\";\n\nexport interface Props {\n iconSize: number;\n googlePlayLink: string;\n appleStoreLink: string;\n\n targetBlank?: boolean;\n className?: string;\n}\n\nconst AppStoreBadges = function (props: Props) {\n const target = props.targetBlank ? \"_blank\" : undefined;\n\n const width = props.iconSize;\n\n return (\n
\n \n \"google\n \n \n \"apple\n \n
\n )\n}\n\nexport default AppStoreBadges","\nexport const GoogleAuthenticator = {\n googlePlay: \"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_us\",\n appleStore: \"https://apps.apple.com/us/app/google-authenticator/id388497605\",\n};","import React, { useEffect, useCallback, useState } from \"react\";\nimport LoginLayout from \"../../layouts/LoginLayout\";\nimport classnames from \"classnames\";\nimport { makeStyles, Typography, Button, Link, CircularProgress } from \"@material-ui/core\";\nimport QRCode from 'qrcode.react';\nimport AppStoreBadges from \"../../components/AppStoreBadges\";\nimport { GoogleAuthenticator } from \"../../constants\";\nimport { useHistory, useLocation } from \"react-router\";\nimport { completeTOTPRegistrationProcess } from \"../../services/RegisterDevice\";\nimport { useNotifications } from \"../../hooks/NotificationsContext\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTimesCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { red } from \"@material-ui/core/colors\";\nimport { extractIdentityToken } from \"../../utils/IdentityToken\";\nimport { FirstFactorRoute } from \"../../Routes\";\n\nconst RegisterOneTimePassword = function () {\n const style = useStyles();\n const history = useHistory();\n const location = useLocation();\n\n // The secret retrieved from the API is all is ok.\n const [secretURL, setSecretURL] = useState(\"empty\");\n const [secretBase32, setSecretBase32] = useState(undefined as string | undefined);\n const { createErrorNotification } = useNotifications();\n const [hasErrored, setHasErrored] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n // Get the token from the query param to give it back to the API when requesting\n // the secret for OTP.\n const processToken = extractIdentityToken(location.search);\n\n const handleDoneClick = () => {\n history.push(FirstFactorRoute);\n }\n\n const completeRegistrationProcess = useCallback(async () => {\n if (!processToken) {\n return;\n }\n\n setIsLoading(true);\n try {\n const secret = await completeTOTPRegistrationProcess(processToken);\n setSecretURL(secret.otpauth_url);\n setSecretBase32(secret.base32_secret);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"Failed to generate the code to register your device\", 10000);\n setHasErrored(true);\n }\n setIsLoading(false);\n }, [processToken, createErrorNotification]);\n\n useEffect(() => { completeRegistrationProcess() }, [completeRegistrationProcess]);\n const qrcodeFuzzyStyle = (isLoading || hasErrored) ? style.fuzzy : undefined\n\n return (\n \n
\n
\n Need Google Authenticator?\n \n
\n
\n \n \n {!hasErrored && isLoading ? : null}\n {hasErrored ? : null}\n \n
\n {secretBase32\n ? : null}\n \n Done\n \n
\n
\n )\n}\n\nexport default RegisterOneTimePassword\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n qrcode: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n fuzzy: {\n filter: \"blur(10px)\"\n },\n secret: {\n display: \"inline-block\",\n fontSize: theme.typography.fontSize * 0.9,\n },\n googleAuthenticator: {},\n googleAuthenticatorText: {\n fontSize: theme.typography.fontSize * 0.8,\n },\n googleAuthenticatorBadges: {},\n doneButton: {\n width: \"256px\",\n },\n qrcodeContainer: {\n position: \"relative\",\n display: \"inline-block\",\n },\n loader: {\n position: \"absolute\",\n top: \"calc(128px - 64px)\",\n left: \"calc(128px - 64px)\",\n color: \"rgba(255, 255, 255, 0.5)\",\n },\n failureIcon: {\n position: \"absolute\",\n top: \"calc(128px - 64px)\",\n left: \"calc(128px - 64px)\",\n color: red[400],\n fontSize: \"128px\",\n }\n}))","import { FirstFactorPath } from \"./Api\";\nimport { PostWithOptionalResponse } from \"./Client\";\nimport { SignInResponse } from \"./SignIn\";\n\ninterface PostFirstFactorBody {\n username: string;\n password: string;\n keepMeLoggedIn: boolean;\n targetURL?: string;\n}\n\nexport async function postFirstFactor(\n username: string, password: string,\n rememberMe: boolean, targetURL?: string) {\n const data: PostFirstFactorBody = {\n username, password,\n keepMeLoggedIn: rememberMe\n };\n\n if (targetURL) {\n data.targetURL = targetURL;\n }\n const res = await PostWithOptionalResponse(FirstFactorPath, data);\n return res ? res : {} as SignInResponse;\n}","import queryString from \"query-string\";\nimport { useLocation } from \"react-router\";\n\nexport function useRedirectionURL() {\n const location = useLocation();\n const queryParams = queryString.parse(location.search);\n return (queryParams && \"rd\" in queryParams)\n ? queryParams[\"rd\"] as string\n : undefined;\n}","import React, { MutableRefObject, useEffect, useRef, useState } from \"react\";\nimport classnames from \"classnames\";\nimport { makeStyles, Grid, Button, FormControlLabel, Checkbox, Link } from \"@material-ui/core\";\nimport { useHistory } from \"react-router\";\nimport LoginLayout from \"../../../layouts/LoginLayout\";\nimport { useNotifications } from \"../../../hooks/NotificationsContext\";\nimport { postFirstFactor } from \"../../../services/FirstFactor\";\nimport { ResetPasswordStep1Route } from \"../../../Routes\";\nimport { useRedirectionURL } from \"../../../hooks/RedirectionURL\";\nimport FixedTextField from \"../../../components/FixedTextField\";\n\nexport interface Props {\n disabled: boolean;\n rememberMe: boolean;\n resetPassword: boolean;\n\n onAuthenticationStart: () => void;\n onAuthenticationFailure: () => void;\n onAuthenticationSuccess: (redirectURL: string | undefined) => void;\n}\n\nconst FirstFactorForm = function (props: Props) {\n const style = useStyles();\n const history = useHistory();\n const redirectionURL = useRedirectionURL();\n\n const [rememberMe, setRememberMe] = useState(false);\n const [username, setUsername] = useState(\"\");\n const [usernameError, setUsernameError] = useState(false);\n const [password, setPassword] = useState(\"\");\n const [passwordError, setPasswordError] = useState(false);\n const { createErrorNotification } = useNotifications();\n // TODO (PR: #806, Issue: #511) potentially refactor\n const usernameRef = useRef() as MutableRefObject;\n const passwordRef = useRef() as MutableRefObject;\n useEffect(() => {\n const timeout = setTimeout(() => usernameRef.current.focus(), 10);\n return () => clearTimeout(timeout);\n }, [usernameRef]);\n\n const disabled = props.disabled;\n\n const handleRememberMeChange = () => {\n setRememberMe(!rememberMe);\n };\n\n const handleSignIn = async () => {\n if (username === \"\" || password === \"\") {\n if (username === \"\") {\n setUsernameError(true)\n }\n\n if (password === \"\") {\n setPasswordError(true);\n }\n return;\n }\n\n props.onAuthenticationStart();\n try {\n const res = await postFirstFactor(username, password, rememberMe, redirectionURL);\n props.onAuthenticationSuccess(res ? res.redirect : undefined);\n } catch (err) {\n console.error(err);\n createErrorNotification(\n \"Incorrect username or password.\");\n props.onAuthenticationFailure();\n setPassword(\"\");\n passwordRef.current.focus();\n }\n };\n\n const handleResetPasswordClick = () => {\n history.push(ResetPasswordStep1Route);\n };\n\n return (\n \n \n \n setUsername(v.target.value)}\n onFocus={() => setUsernameError(false)}\n autoCapitalize=\"none\"\n onKeyPress={(ev) => {\n if (ev.key === 'Enter') {\n if (!username.length) {\n setUsernameError(true)\n } else if (username.length && password.length) {\n handleSignIn();\n } else {\n setUsernameError(false)\n passwordRef.current.focus();\n }\n }\n }} />\n \n \n setPassword(v.target.value)}\n onFocus={() => setPasswordError(false)}\n type=\"password\"\n onKeyPress={(ev) => {\n if (ev.key === 'Enter') {\n if (!username.length) {\n usernameRef.current.focus();\n } else if (!password.length) {\n passwordRef.current.focus();\n }\n handleSignIn();\n ev.preventDefault();\n }\n }} />\n \n {props.rememberMe || props.resetPassword ?\n \n {props.rememberMe ?\n {\n if (ev.key === 'Enter') {\n if (!username.length) {\n usernameRef.current.focus();\n } else if (!password.length) {\n passwordRef.current.focus();\n }\n handleSignIn();\n }\n }}\n value=\"rememberMe\"\n color=\"primary\"/>\n }\n className={style.rememberMe}\n label=\"Remember me\"\n /> : null}\n {props.resetPassword ?\n \n Reset password?\n : null}\n : null}\n \n \n Sign in\n \n \n \n \n )\n}\n\nexport default FirstFactorForm\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(),\n marginBottom: theme.spacing(),\n },\n actionRow: {\n display: \"flex\",\n flexDirection: \"row\",\n marginTop: theme.spacing(-1),\n marginBottom: theme.spacing(-1),\n },\n resetLink: {\n cursor: \"pointer\",\n paddingTop: 13.5,\n paddingBottom: 13.5,\n },\n rememberMe: {\n flexGrow: 1,\n },\n flexEnd: {\n justifyContent: \"flex-end\",\n },\n leftAlign: {\n textAlign: \"left\",\n },\n rightAlign: {\n textAlign: \"right\",\n verticalAlign: \"bottom\",\n },\n}));","import React from \"react\";\nimport style from \"./PushNotificationIcon.module.css\";\nimport {useIntermittentClass} from \"../hooks/IntermittentClass\";\n\nexport interface Props {\n width: number;\n height: number;\n\n animated?: boolean;\n}\n\nconst PushNotificationIcon = function (props: Props) {\n const idleMilliseconds = 2500;\n const wiggleMilliseconds = 500;\n const startMilliseconds = 500;\n const wiggleClass = useIntermittentClass((props.animated) ? style.wiggle : \"\", wiggleMilliseconds, idleMilliseconds, startMilliseconds);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default PushNotificationIcon","\nexport enum SecondFactorMethod {\n TOTP = 1,\n U2F = 2,\n MobilePush = 3\n}\n","import { useState, useEffect } from \"react\";\n\nexport function useIntermittentClass(\n classname: string,\n activeMilliseconds: number,\n inactiveMillisecond: number,\n startMillisecond?: number) {\n const [currentClass, setCurrentClass] = useState(\"\");\n const [firstTime, setFirstTime] = useState(true);\n\n useEffect(() => {\n let timeout: NodeJS.Timeout;\n\n if (firstTime) {\n if (startMillisecond && startMillisecond > 0) {\n timeout = setTimeout(() => {\n setCurrentClass(classname);\n setFirstTime(false);\n }, startMillisecond);\n } else {\n timeout = setTimeout(() => {\n setCurrentClass(classname);\n setFirstTime(false);\n }, 0);\n }\n } else {\n if (currentClass === \"\") {\n timeout = setTimeout(() => setCurrentClass(classname), inactiveMillisecond);\n } else {\n timeout = setTimeout(() => setCurrentClass(\"\"), activeMilliseconds);\n }\n }\n return () => clearTimeout(timeout);\n }, [currentClass, classname, activeMilliseconds, inactiveMillisecond, startMillisecond, firstTime]);\n\n return currentClass;\n}","import React from \"react\";\n\nexport interface Props {\n maxProgress?: number;\n progress: number;\n\n width?: number;\n height?: number;\n\n color?: string;\n backgroundColor?: string;\n}\n\nconst PieChartIcon = function (props: Props) {\n const maxProgress = props.maxProgress ? props.maxProgress : 100;\n const width = props.width ? props.width : 20;\n const height = props.height ? props.height : 20;\n\n const color = props.color ? props.color : \"black\";\n const backgroundColor = props.backgroundColor ? props.backgroundColor : \"white\";\n\n return (\n \n \n \n \n \n )\n}\n\nexport default PieChartIcon","import React, { ReactNode } from \"react\";\nimport { Dialog, Grid, makeStyles, DialogContent, Button, DialogActions, Typography, useTheme } from \"@material-ui/core\";\nimport PushNotificationIcon from \"../../../components/PushNotificationIcon\";\nimport PieChartIcon from \"../../../components/PieChartIcon\";\nimport { SecondFactorMethod } from \"../../../models/Methods\";\nimport FingerTouchIcon from \"../../../components/FingerTouchIcon\";\n\nexport interface Props {\n open: boolean;\n methods: Set;\n u2fSupported: boolean;\n\n onClose: () => void;\n onClick: (method: SecondFactorMethod) => void;\n}\n\nconst MethodSelectionDialog = function (props: Props) {\n const style = useStyles();\n const theme = useTheme();\n\n const pieChartIcon = \n\n return (\n \n \n \n {props.methods.has(SecondFactorMethod.TOTP)\n ? props.onClick(SecondFactorMethod.TOTP)} />\n : null}\n {props.methods.has(SecondFactorMethod.U2F) && props.u2fSupported\n ? }\n onClick={() => props.onClick(SecondFactorMethod.U2F)} />\n : null}\n {props.methods.has(SecondFactorMethod.MobilePush)\n ? }\n onClick={() => props.onClick(SecondFactorMethod.MobilePush)} />\n : null}\n \n \n \n \n \n \n )\n}\n\nexport default MethodSelectionDialog\n\nconst useStyles = makeStyles(theme => ({\n root: {\n textAlign: \"center\",\n }\n}))\n\ninterface MethodItemProps {\n id: string;\n method: string;\n icon: ReactNode;\n\n onClick: () => void;\n}\n\nfunction MethodItem(props: MethodItemProps) {\n const style = makeStyles(theme => ({\n item: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n width: \"100%\",\n },\n icon: {\n display: \"inline-block\",\n fill: \"white\",\n },\n buttonRoot: {\n display: \"block\",\n }\n }))();\n\n return (\n \n \n \n )\n}","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faInfoCircle } from \"@fortawesome/free-solid-svg-icons\";\n\nexport interface Props { }\n\nconst InformationIcon = function (props: Props) {\n return (\n \n )\n}\n\nexport default InformationIcon","import React, { ReactNode, Fragment } from \"react\";\nimport { makeStyles, Typography, Link, useTheme } from \"@material-ui/core\";\nimport InformationIcon from \"../../../components/InformationIcon\";\nimport classnames from \"classnames\";\nimport Authenticated from \"../Authenticated\";\n\nexport enum State {\n ALREADY_AUTHENTICATED = 1,\n NOT_REGISTERED = 2,\n METHOD = 3\n}\n\nexport interface Props {\n id: string;\n title: string;\n explanation: string;\n state: State;\n children: ReactNode;\n\n onRegisterClick?: () => void;\n}\n\nconst DefaultMethodContainer = function (props: Props) {\n const style = useStyles();\n\n let container: ReactNode;\n let stateClass: string = '';\n switch (props.state) {\n case State.ALREADY_AUTHENTICATED:\n container = \n stateClass = \"state-already-authenticated\";\n break;\n case State.NOT_REGISTERED:\n container = \n stateClass = \"state-not-registered\";\n break;\n case State.METHOD:\n container = \n {props.children}\n \n stateClass = \"state-method\";\n break;\n }\n\n\n return (\n
\n {props.title}\n
\n
\n {container}\n
\n
\n {props.onRegisterClick\n ? \n Not registered yet?\n \n : null}\n
\n )\n}\n\nexport default DefaultMethodContainer\n\nconst useStyles = makeStyles(theme => ({\n container: {\n height: \"200px\",\n },\n containerFlex: {\n display: \"flex\",\n flexWrap: \"wrap\",\n height: \"100%\",\n width: \"100%\",\n alignItems: \"center\",\n alignContent: \"center\",\n justifyContent: \"center\",\n }\n}));\n\nfunction NotRegisteredContainer() {\n const theme = useTheme();\n return (\n \n
\n Register your first device by clicking on the link below\n
\n )\n}\n\ninterface MethodContainerProps {\n explanation: string;\n children: ReactNode;\n}\n\nfunction MethodContainer(props: MethodContainerProps) {\n const theme = useTheme();\n return (\n \n
{props.children}
\n {props.explanation}\n
\n )\n}","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheckCircle } from \"@fortawesome/free-regular-svg-icons\";\n\nconst SuccessIcon = function () {\n return (\n \n )\n}\n\nexport default SuccessIcon","import React from \"react\";\nimport SuccessIcon from \"../../components/SuccessIcon\";\nimport { Typography, makeStyles } from \"@material-ui/core\";\n\nconst Authenticated = function () {\n const classes = useStyles();\n return (\n
\n
\n \n
\n Authenticated\n
\n )\n}\n\nexport default Authenticated\n\nconst useStyles = makeStyles(theme => ({\n iconContainer: {\n marginBottom: theme.spacing(2),\n flex: \"0 0 100%\"\n }\n}))","import { Post, PostWithOptionalResponse } from \"./Client\";\nimport { InitiateU2FSignInPath, CompleteU2FSignInPath } from \"./Api\";\nimport u2fApi from \"u2f-api\";\nimport { SignInResponse } from \"./SignIn\";\n\ninterface InitiateU2FSigninResponse {\n appId: string,\n challenge: string,\n registeredKeys: {\n appId: string,\n keyHandle: string,\n version: string,\n }[]\n}\n\nexport async function initiateU2FSignin() {\n return Post(InitiateU2FSignInPath);\n}\n\ninterface CompleteU2FSigninBody {\n signResponse: u2fApi.SignResponse;\n targetURL?: string;\n}\n\nexport function completeU2FSignin(signResponse: u2fApi.SignResponse, targetURL: string | undefined) {\n const body: CompleteU2FSigninBody = { signResponse };\n if (targetURL) {\n body.targetURL = targetURL;\n }\n return PostWithOptionalResponse(CompleteU2FSignInPath, body);\n}","import { useRef, useEffect } from \"react\";\n\nexport function useIsMountedRef() {\n const isMountedRef = useRef(false);\n useEffect(() => {\n isMountedRef.current = true;\n return () => { isMountedRef.current = false };\n });\n return isMountedRef;\n}","import { Get } from \"./Client\";\nimport { StatePath } from \"./Api\";\n\nexport enum AuthenticationLevel {\n Unauthenticated = 0,\n OneFactor = 1,\n TwoFactor = 2,\n}\n\nexport interface AutheliaState {\n username: string;\n authentication_level: AuthenticationLevel\n}\n\nexport async function getState(): Promise {\n return Get(StatePath);\n}","import React, { useCallback, useEffect, useState, Fragment } from \"react\";\nimport MethodContainer, { State as MethodContainerState } from \"./MethodContainer\";\nimport { makeStyles, Button, useTheme } from \"@material-ui/core\";\nimport { initiateU2FSignin, completeU2FSignin } from \"../../../services/SecurityKey\";\nimport u2fApi from \"u2f-api\";\nimport { useRedirectionURL } from \"../../../hooks/RedirectionURL\";\nimport { useIsMountedRef } from \"../../../hooks/Mounted\";\nimport { useTimer } from \"../../../hooks/Timer\";\nimport LinearProgressBar from \"../../../components/LinearProgressBar\";\nimport FingerTouchIcon from \"../../../components/FingerTouchIcon\";\nimport FailureIcon from \"../../../components/FailureIcon\";\nimport IconWithContext from \"./IconWithContext\";\nimport { CSSProperties } from \"@material-ui/styles\";\nimport { AuthenticationLevel } from \"../../../services/State\";\n\nexport enum State {\n WaitTouch = 1,\n SigninInProgress = 2,\n Failure = 3,\n}\n\nexport interface Props {\n id: string;\n authenticationLevel: AuthenticationLevel;\n registered: boolean;\n\n onRegisterClick: () => void;\n onSignInError: (err: Error) => void;\n onSignInSuccess: (redirectURL: string | undefined) => void;\n}\n\nconst SecurityKeyMethod = function (props: Props) {\n const signInTimeout = 30;\n const [state, setState] = useState(State.WaitTouch);\n const style = useStyles();\n const redirectionURL = useRedirectionURL();\n const mounted = useIsMountedRef();\n const [timerPercent, triggerTimer,] = useTimer(signInTimeout * 1000 - 500);\n\n const { onSignInSuccess, onSignInError } = props;\n /* eslint-disable react-hooks/exhaustive-deps */\n const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const doInitiateSignIn = useCallback(async () => {\n // If user is already authenticated, we don't initiate sign in process.\n if (!props.registered || props.authenticationLevel >= AuthenticationLevel.TwoFactor) {\n return;\n }\n\n try {\n triggerTimer();\n setState(State.WaitTouch);\n const signRequest = await initiateU2FSignin();\n const signRequests: u2fApi.SignRequest[] = [];\n for (var i in signRequest.registeredKeys) {\n const r = signRequest.registeredKeys[i];\n signRequests.push({\n appId: signRequest.appId,\n challenge: signRequest.challenge,\n keyHandle: r.keyHandle,\n version: r.version,\n })\n }\n const signResponse = await u2fApi.sign(signRequests, signInTimeout);\n // If the request was initiated and the user changed 2FA method in the meantime,\n // the process is interrupted to avoid updating state of unmounted component.\n if (!mounted.current) return;\n\n setState(State.SigninInProgress);\n const res = await completeU2FSignin(signResponse, redirectionURL);\n onSignInSuccessCallback(res ? res.redirect : undefined);\n } catch (err) {\n // If the request was initiated and the user changed 2FA method in the meantime,\n // the process is interrupted to avoid updating state of unmounted component.\n if (!mounted.current) return;\n console.error(err);\n onSignInErrorCallback(new Error(\"Failed to initiate security key sign in process\"));\n setState(State.Failure);\n }\n }, [onSignInSuccessCallback, onSignInErrorCallback, redirectionURL, mounted, triggerTimer, props.authenticationLevel, props.registered]);\n\n useEffect(() => { doInitiateSignIn() }, [doInitiateSignIn]);\n\n let methodState = MethodContainerState.METHOD;\n if (props.authenticationLevel === AuthenticationLevel.TwoFactor) {\n methodState = MethodContainerState.ALREADY_AUTHENTICATED;\n } else if (!props.registered) {\n methodState = MethodContainerState.NOT_REGISTERED;\n }\n\n return (\n \n
\n \n
\n \n )\n}\n\nexport default SecurityKeyMethod\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n display: \"inline-block\",\n }\n}));\n\ninterface IconProps {\n state: State;\n\n timer: number;\n onRetryClick: () => void;\n}\n\nfunction Icon(props: IconProps) {\n const state = props.state as State;\n const theme = useTheme();\n\n const progressBarStyle: CSSProperties = {\n marginTop: theme.spacing(),\n }\n\n const touch = }\n context={}\n className={state === State.WaitTouch ? undefined : \"hidden\"} />\n\n const failure = }\n context={}\n className={state === State.Failure ? undefined : \"hidden\"} />\n\n return (\n \n {touch}\n {failure}\n \n )\n}\n","import React from \"react\";\nimport { makeStyles, LinearProgress } from \"@material-ui/core\";\nimport { CSSProperties } from \"@material-ui/styles\";\n\nexport interface Props {\n value: number;\n height?: number;\n className?: string;\n style?: CSSProperties;\n}\n\nconst LinearProgressBar = function (props: Props) {\n const style = makeStyles(theme => ({\n progressRoot: {\n height: props.height ? props.height : theme.spacing(),\n },\n transition: {\n transition: \"transform .2s linear\",\n }\n }))();\n return (\n \n )\n}\n\nexport default LinearProgressBar","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTimesCircle } from \"@fortawesome/free-regular-svg-icons\";\n\nexport interface Props { }\n\nconst FailureIcon = function (props: Props) {\n return (\n \n )\n}\n\nexport default FailureIcon","import React, { ReactNode } from \"react\";\nimport { makeStyles } from \"@material-ui/core\";\nimport classnames from \"classnames\";\n\ninterface IconWithContextProps {\n icon: ReactNode;\n context: ReactNode;\n\n className?: string;\n}\n\nconst IconWithContext = function (props: IconWithContextProps) {\n const iconSize = 64;\n const style = makeStyles(theme => ({\n root: {},\n iconContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n },\n icon: {\n width: iconSize,\n height: iconSize,\n },\n context: {\n display: \"block\",\n }\n }))();\n\n return (\n
\n
\n
\n {props.icon}\n
\n
\n
\n {props.context}\n
\n
\n )\n}\n\nexport default IconWithContext","import { useState, useCallback, useEffect } from \"react\";\n\nexport function useTimer(timeoutMs: number): [number, () => void, () => void] {\n const Interval = 100;\n const [startDate, setStartDate] = useState(undefined as Date | undefined);\n const [percent, setPercent] = useState(0);\n\n const trigger = useCallback(() => {\n setPercent(0);\n setStartDate(new Date());\n }, [setStartDate, setPercent]);\n\n const clear = useCallback(() => {\n setPercent(0);\n setStartDate(undefined);\n }, []);\n\n useEffect(() => {\n if (!startDate) {\n return;\n }\n\n const intervalNode = setInterval(() => {\n const elapsedMs = (startDate) ? new Date().getTime() - startDate.getTime() : 0;\n let p = elapsedMs / timeoutMs * 100.0;\n if (p >= 100) {\n p = 100;\n setStartDate(undefined);\n }\n setPercent(p);\n }, Interval);\n\n return () => clearInterval(intervalNode);\n }, [startDate, setPercent, setStartDate, timeoutMs]);\n\n return [\n percent,\n trigger,\n clear,\n ]\n}","import React, { useState, useEffect, useCallback } from \"react\";\nimport MethodContainer, { State as MethodContainerState } from \"./MethodContainer\";\nimport OTPDial from \"./OTPDial\";\nimport { completeTOTPSignIn } from \"../../../services/OneTimePassword\";\nimport { useRedirectionURL } from \"../../../hooks/RedirectionURL\";\nimport { AuthenticationLevel } from \"../../../services/State\";\n\nexport enum State {\n Idle = 1,\n InProgress = 2,\n Success = 3,\n Failure = 4,\n}\n\nexport interface Props {\n id: string;\n authenticationLevel: AuthenticationLevel;\n registered: boolean;\n totp_period: number\n\n onRegisterClick: () => void;\n onSignInError: (err: Error) => void;\n onSignInSuccess: (redirectURL: string | undefined) => void;\n}\n\nconst OneTimePasswordMethod = function (props: Props) {\n const [passcode, setPasscode] = useState(\"\");\n const [state, setState] = useState(props.authenticationLevel === AuthenticationLevel.TwoFactor\n ? State.Success\n : State.Idle);\n const redirectionURL = useRedirectionURL();\n\n const { onSignInSuccess, onSignInError } = props;\n /* eslint-disable react-hooks/exhaustive-deps */\n const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const signInFunc = useCallback(async () => {\n if (props.authenticationLevel === AuthenticationLevel.TwoFactor) {\n return;\n }\n\n const passcodeStr = `${passcode}`;\n\n if (!passcode || passcodeStr.length !== 6) {\n return;\n }\n\n try {\n setState(State.InProgress);\n const res = await completeTOTPSignIn(passcodeStr, redirectionURL);\n setState(State.Success);\n onSignInSuccessCallback(res ? res.redirect : undefined);\n } catch (err) {\n console.error(err);\n onSignInErrorCallback(new Error(\"The one-time password might be wrong\"));\n setState(State.Failure);\n }\n setPasscode(\"\");\n }, [passcode, onSignInErrorCallback, onSignInSuccessCallback, redirectionURL, props.authenticationLevel]);\n\n // Set successful state if user is already authenticated.\n useEffect(() => {\n if (props.authenticationLevel >= AuthenticationLevel.TwoFactor) {\n setState(State.Success);\n }\n }, [props.authenticationLevel, setState]);\n\n useEffect(() => { signInFunc() }, [signInFunc]);\n\n let methodState = MethodContainerState.METHOD;\n if (props.authenticationLevel === AuthenticationLevel.TwoFactor) {\n methodState = MethodContainerState.ALREADY_AUTHENTICATED;\n } else if (!props.registered) {\n methodState = MethodContainerState.NOT_REGISTERED;\n }\n\n return (\n \n \n \n )\n}\n\nexport default OneTimePasswordMethod","import React, { useState, useEffect } from \"react\";\nimport PieChartIcon from \"./PieChartIcon\";\n\nexport interface Props {\n width: number;\n height: number;\n period: number;\n\n color?: string;\n backgroundColor?: string;\n}\n\nconst TimerIcon = function (props: Props) {\n const radius = 31.6;\n const [timeProgress, setTimeProgress] = useState(0);\n\n useEffect(() => {\n // Get the current number of seconds to initialize timer.\n const initialValue = (new Date().getTime() / 1000) % props.period / props.period * radius;\n setTimeProgress(initialValue);\n\n const interval = setInterval(() => {\n const value = (new Date().getTime() / 1000) % props.period / props.period * radius;\n setTimeProgress(value);\n }, 100);\n return () => clearInterval(interval);\n }, [props]);\n\n return (\n \n )\n}\n\nexport default TimerIcon","import React, { Fragment } from \"react\";\nimport OtpInput from \"react-otp-input\";\nimport TimerIcon from \"../../../components/TimerIcon\";\nimport { makeStyles } from \"@material-ui/core\";\nimport classnames from \"classnames\";\nimport IconWithContext from \"./IconWithContext\";\nimport { State } from \"./OneTimePasswordMethod\";\nimport SuccessIcon from \"../../../components/SuccessIcon\";\n\nexport interface Props {\n passcode: string;\n state: State;\n period: number\n\n onChange: (passcode: string) => void;\n}\n\nconst OTPDial = function (props: Props) {\n const style = useStyles();\n const dial = (\n \n \n \n )\n\n return (\n }\n context={dial} />\n )\n}\n\nexport default OTPDial\n\nconst useStyles = makeStyles(theme => ({\n timeProgress: {\n },\n register: {\n marginTop: theme.spacing(),\n },\n otpInput: {\n display: \"inline-block\",\n marginTop: theme.spacing(2),\n },\n otpDigitInput: {\n padding: theme.spacing(),\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n fontSize: \"1rem\",\n borderRadius: \"5px\",\n border: \"1px solid rgba(0,0,0,0.3)\",\n },\n inputError: {\n border: \"1px solid rgba(255, 2, 2, 0.95)\",\n }\n}));\n\ninterface IconProps {\n state: State;\n period: number;\n}\n\nfunction Icon(props: IconProps) {\n return (\n \n {props.state !== State.Success ? : null}\n {props.state === State.Success ? : null}\n \n )\n}","import { PostWithOptionalResponse } from \"./Client\";\nimport { CompleteTOTPSignInPath } from \"./Api\";\nimport { SignInResponse } from \"./SignIn\";\n\ninterface CompleteU2FSigninBody {\n token: string;\n targetURL?: string;\n}\n\nexport function completeTOTPSignIn(passcode: string, targetURL: string | undefined) {\n const body: CompleteU2FSigninBody = { token: `${passcode}` };\n if (targetURL) {\n body.targetURL = targetURL;\n }\n return PostWithOptionalResponse(CompleteTOTPSignInPath, body);\n}","import React, { useEffect, useCallback, useState, ReactNode } from \"react\";\nimport MethodContainer, { State as MethodContainerState } from \"./MethodContainer\";\nimport PushNotificationIcon from \"../../../components/PushNotificationIcon\";\nimport { completePushNotificationSignIn } from \"../../../services/PushNotification\";\nimport { Button, makeStyles } from \"@material-ui/core\";\nimport { useRedirectionURL } from \"../../../hooks/RedirectionURL\";\nimport { useIsMountedRef } from \"../../../hooks/Mounted\";\nimport SuccessIcon from \"../../../components/SuccessIcon\";\nimport FailureIcon from \"../../../components/FailureIcon\";\nimport { AuthenticationLevel } from \"../../../services/State\";\n\nexport enum State {\n SignInInProgress = 1,\n Success = 2,\n Failure = 3,\n}\n\nexport interface Props {\n id: string;\n authenticationLevel: AuthenticationLevel;\n\n onSignInError: (err: Error) => void;\n onSignInSuccess: (redirectURL: string | undefined) => void;\n}\n\nconst PushNotificationMethod = function (props: Props) {\n const style = useStyles();\n const [state, setState] = useState(State.SignInInProgress);\n const redirectionURL = useRedirectionURL();\n const mounted = useIsMountedRef();\n\n const { onSignInSuccess, onSignInError } = props;\n /* eslint-disable react-hooks/exhaustive-deps */\n const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\n /* eslint-enable react-hooks/exhaustive-deps */\n\n const signInFunc = useCallback(async () => {\n if (props.authenticationLevel === AuthenticationLevel.TwoFactor) {\n return;\n }\n\n try {\n setState(State.SignInInProgress);\n const res = await completePushNotificationSignIn(redirectionURL);\n // If the request was initiated and the user changed 2FA method in the meantime,\n // the process is interrupted to avoid updating state of unmounted component.\n if (!mounted.current) return;\n\n setState(State.Success);\n setTimeout(() => {\n if (!mounted.current) return;\n onSignInSuccessCallback(res ? res.redirect : undefined)\n }, 1500);\n } catch (err) {\n // If the request was initiated and the user changed 2FA method in the meantime,\n // the process is interrupted to avoid updating state of unmounted component.\n if (!mounted.current) return;\n\n console.error(err);\n onSignInErrorCallback(new Error(\"There was an issue completing sign in process\"));\n setState(State.Failure);\n }\n }, [onSignInErrorCallback, onSignInSuccessCallback, setState, redirectionURL, mounted, props.authenticationLevel]);\n\n useEffect(() => { signInFunc() }, [signInFunc]);\n\n // Set successful state if user is already authenticated.\n useEffect(() => {\n if (props.authenticationLevel >= AuthenticationLevel.TwoFactor) {\n setState(State.Success);\n }\n }, [props.authenticationLevel, setState]);\n\n let icon: ReactNode;\n switch (state) {\n case State.SignInInProgress:\n icon = ;\n break;\n case State.Success:\n icon = ;\n break;\n case State.Failure:\n icon = ;\n }\n\n let methodState = MethodContainerState.METHOD;\n if (props.authenticationLevel === AuthenticationLevel.TwoFactor) {\n methodState = MethodContainerState.ALREADY_AUTHENTICATED;\n }\n\n return (\n \n
\n {icon}\n
\n
\n \n
\n \n )\n}\n\nexport default PushNotificationMethod\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n width: \"64px\",\n height: \"64px\",\n display: \"inline-block\",\n }\n}))","import { PostWithOptionalResponse } from \"./Client\";\nimport { CompletePushNotificationSignInPath } from \"./Api\";\nimport { SignInResponse } from \"./SignIn\";\n\ninterface CompleteU2FSigninBody {\n targetURL?: string;\n}\n\nexport function completePushNotificationSignIn(targetURL: string | undefined) {\n const body: CompleteU2FSigninBody = {};\n if (targetURL) {\n body.targetURL = targetURL;\n }\n return PostWithOptionalResponse(CompletePushNotificationSignInPath, body);\n}","import { Get, PostWithOptionalResponse } from \"./Client\";\nimport { UserInfoPath, UserInfo2FAMethodPath } from \"./Api\";\nimport { SecondFactorMethod } from \"../models/Methods\";\nimport { UserInfo } from \"../models/UserInfo\";\n\nexport type Method2FA = \"u2f\" | \"totp\" | \"mobile_push\";\n\nexport interface UserInfoPayload {\n display_name: string;\n method: Method2FA;\n has_u2f: boolean;\n has_totp: boolean;\n}\n\nexport interface MethodPreferencePayload {\n method: Method2FA;\n}\n\nexport function toEnum(method: Method2FA): SecondFactorMethod {\n switch (method) {\n case \"u2f\":\n return SecondFactorMethod.U2F;\n case \"totp\":\n return SecondFactorMethod.TOTP;\n case \"mobile_push\":\n return SecondFactorMethod.MobilePush;\n }\n}\n\nexport function toString(method: SecondFactorMethod): Method2FA {\n switch (method) {\n case SecondFactorMethod.U2F:\n return \"u2f\";\n case SecondFactorMethod.TOTP:\n return \"totp\";\n case SecondFactorMethod.MobilePush:\n return \"mobile_push\";\n }\n}\n\nexport async function getUserPreferences(): Promise {\n const res = await Get(UserInfoPath);\n return { ...res, method: toEnum(res.method) };\n}\n\nexport function setPreferred2FAMethod(method: SecondFactorMethod) {\n return PostWithOptionalResponse(UserInfo2FAMethodPath,\n { method: toString(method) } as MethodPreferencePayload);\n}","import React, { useState, useEffect } from \"react\";\nimport { Grid, makeStyles, Button } from \"@material-ui/core\";\nimport MethodSelectionDialog from \"./MethodSelectionDialog\";\nimport { SecondFactorMethod } from \"../../../models/Methods\";\nimport { useHistory, Switch, Route, Redirect } from \"react-router\";\nimport LoginLayout from \"../../../layouts/LoginLayout\";\nimport { useNotifications } from \"../../../hooks/NotificationsContext\";\nimport {\n initiateTOTPRegistrationProcess,\n initiateU2FRegistrationProcess\n} from \"../../../services/RegisterDevice\";\nimport SecurityKeyMethod from \"./SecurityKeyMethod\";\nimport OneTimePasswordMethod from \"./OneTimePasswordMethod\";\nimport PushNotificationMethod from \"./PushNotificationMethod\";\nimport {\n LogoutRoute as SignOutRoute, SecondFactorTOTPRoute,\n SecondFactorPushRoute, SecondFactorU2FRoute, SecondFactorRoute\n} from \"../../../Routes\";\nimport { setPreferred2FAMethod } from \"../../../services/UserPreferences\";\nimport { UserInfo } from \"../../../models/UserInfo\";\nimport { Configuration } from \"../../../models/Configuration\";\nimport u2fApi from \"u2f-api\";\nimport { AuthenticationLevel } from \"../../../services/State\";\n\nconst EMAIL_SENT_NOTIFICATION = \"An email has been sent to your address to complete the process.\";\n\nexport interface Props {\n authenticationLevel: AuthenticationLevel;\n\n userInfo: UserInfo;\n configuration: Configuration;\n\n onMethodChanged: (method: SecondFactorMethod) => void;\n onAuthenticationSuccess: (redirectURL: string | undefined) => void;\n}\n\nconst SecondFactorForm = function (props: Props) {\n const style = useStyles();\n const history = useHistory();\n const [methodSelectionOpen, setMethodSelectionOpen] = useState(false);\n const { createInfoNotification, createErrorNotification } = useNotifications();\n const [registrationInProgress, setRegistrationInProgress] = useState(false);\n const [u2fSupported, setU2fSupported] = useState(false);\n\n // Check that U2F is supported.\n useEffect(() => {\n u2fApi.ensureSupport().then(\n () => setU2fSupported(true),\n () => console.error(\"U2F not supported\"));\n }, [setU2fSupported]);\n\n const initiateRegistration = (initiateRegistrationFunc: () => Promise) => {\n return async () => {\n if (registrationInProgress) {\n return;\n }\n setRegistrationInProgress(true);\n try {\n await initiateRegistrationFunc();\n createInfoNotification(EMAIL_SENT_NOTIFICATION);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was a problem initiating the registration process\");\n }\n setRegistrationInProgress(false);\n }\n }\n\n const handleMethodSelectionClick = () => {\n setMethodSelectionOpen(true);\n }\n\n const handleMethodSelected = async (method: SecondFactorMethod) => {\n try {\n await setPreferred2FAMethod(method);\n setMethodSelectionOpen(false);\n props.onMethodChanged(method);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was an issue updating preferred second factor method\");\n }\n }\n\n const handleLogoutClick = () => {\n history.push(SignOutRoute);\n }\n\n return (\n \n setMethodSelectionOpen(false)}\n onClick={handleMethodSelected} />\n \n \n \n {\" | \"}\n \n \n \n \n \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess} />\n \n \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess} />\n \n \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess} />\n \n \n \n \n \n \n \n \n )\n}\n\nexport default SecondFactorForm\n\nconst useStyles = makeStyles(theme => ({\n methodContainer: {\n border: \"1px solid #d6d6d6\",\n borderRadius: \"10px\",\n padding: theme.spacing(4),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n}))\n","import { useState, useCallback, DependencyList } from \"react\";\n\ntype PromisifiedFunction = (...args: any) => Promise\n\nexport function useRemoteCall(fn: PromisifiedFunction, deps: DependencyList)\n : [Ret | undefined, PromisifiedFunction, boolean, Error | undefined] {\n const [data, setData] = useState(undefined as Ret | undefined);\n const [inProgress, setInProgress] = useState(false);\n const [error, setError] = useState(undefined as Error | undefined);\n\n const fnCallback = useCallback(fn, [fn, deps]);\n\n const triggerCallback = useCallback(async () => {\n try {\n setInProgress(true);\n const res = await fnCallback();\n setInProgress(false);\n setData(res);\n } catch (err) {\n console.error(err);\n setError(err);\n }\n }, [setInProgress, setError, fnCallback]);\n\n return [\n data,\n triggerCallback,\n inProgress,\n error,\n ]\n}","import React from \"react\";\nimport ReactLoading from \"react-loading\";\nimport { Typography, Grid } from \"@material-ui/core\";\n\nconst LoadingPage = function () {\n return (\n \n \n \n Loading...\n \n \n );\n}\n\nexport default LoadingPage","import { Get } from \"./Client\";\nimport { ConfigurationPath } from \"./Api\";\nimport { toEnum, Method2FA } from \"./UserPreferences\";\nimport { Configuration } from \"../models/Configuration\";\n\ninterface ConfigurationPayload {\n available_methods: Method2FA[];\n second_factor_enabled: boolean;\n totp_period: number;\n}\n\nexport async function getConfiguration(): Promise {\n const config = await Get(ConfigurationPath);\n return { ...config, available_methods: new Set(config.available_methods.map(toEnum)) };\n}","import React from \"react\";\nimport { Grid, makeStyles, Button } from \"@material-ui/core\";\nimport { useHistory } from \"react-router\";\nimport LoginLayout from \"../../../layouts/LoginLayout\";\nimport { LogoutRoute as SignOutRoute } from \"../../../Routes\";\nimport Authenticated from \"../Authenticated\";\n\nexport interface Props {\n name: string;\n}\n\nconst AuthenticatedView = function (props: Props) {\n const style = useStyles();\n const history = useHistory();\n\n const handleLogoutClick = () => {\n history.push(SignOutRoute);\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default AuthenticatedView\n\nconst useStyles = makeStyles(theme => ({\n mainContainer: {\n border: \"1px solid #d6d6d6\",\n borderRadius: \"10px\",\n padding: theme.spacing(4),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n }\n}))\n","import React, { useEffect, Fragment, ReactNode, useState, useCallback } from \"react\";\nimport { Switch, Route, Redirect, useHistory, useLocation } from \"react-router\";\nimport FirstFactorForm from \"./FirstFactor/FirstFactorForm\";\nimport SecondFactorForm from \"./SecondFactor/SecondFactorForm\";\nimport {\n FirstFactorRoute, SecondFactorRoute, SecondFactorTOTPRoute,\n SecondFactorPushRoute, SecondFactorU2FRoute, AuthenticatedRoute\n} from \"../../Routes\";\nimport { useAutheliaState } from \"../../hooks/State\";\nimport LoadingPage from \"../LoadingPage/LoadingPage\";\nimport { AuthenticationLevel } from \"../../services/State\";\nimport { useNotifications } from \"../../hooks/NotificationsContext\";\nimport { useRedirectionURL } from \"../../hooks/RedirectionURL\";\nimport { useUserPreferences as userUserInfo } from \"../../hooks/UserInfo\";\nimport { SecondFactorMethod } from \"../../models/Methods\";\nimport { useConfiguration } from \"../../hooks/Configuration\";\nimport AuthenticatedView from \"./AuthenticatedView/AuthenticatedView\";\n\nexport interface Props {\n rememberMe: boolean;\n resetPassword: boolean;\n}\n\nconst LoginPortal = function (props: Props) {\n const history = useHistory();\n const location = useLocation();\n const redirectionURL = useRedirectionURL();\n const { createErrorNotification } = useNotifications();\n const [firstFactorDisabled, setFirstFactorDisabled] = useState(true);\n\n const [state, fetchState, , fetchStateError] = useAutheliaState();\n const [userInfo, fetchUserInfo, , fetchUserInfoError] = userUserInfo();\n const [configuration, fetchConfiguration, , fetchConfigurationError] = useConfiguration();\n\n const redirect = useCallback((url: string) => history.push(url), [history]);\n\n // Fetch the state when portal is mounted.\n useEffect(() => { fetchState() }, [fetchState]);\n\n // Fetch preferences and configuration when user is authenticated.\n useEffect(() => {\n if (state && state.authentication_level >= AuthenticationLevel.OneFactor) {\n fetchUserInfo();\n fetchConfiguration();\n }\n }, [state, fetchUserInfo, fetchConfiguration]);\n\n // Enable first factor when user is unauthenticated.\n useEffect(() => {\n if (state && state.authentication_level > AuthenticationLevel.Unauthenticated) {\n setFirstFactorDisabled(true);\n }\n }, [state, setFirstFactorDisabled]);\n\n // Display an error when state fetching fails\n useEffect(() => {\n if (fetchStateError) {\n createErrorNotification(\"There was an issue fetching the current user state\");\n }\n }, [fetchStateError, createErrorNotification]);\n\n // Display an error when configuration fetching fails\n useEffect(() => {\n if (fetchConfigurationError) {\n createErrorNotification(\"There was an issue retrieving global configuration\");\n }\n }, [fetchConfigurationError, createErrorNotification]);\n\n // Display an error when preferences fetching fails\n useEffect(() => {\n if (fetchUserInfoError) {\n createErrorNotification(\"There was an issue retrieving user preferences\");\n }\n }, [fetchUserInfoError, createErrorNotification]);\n\n // Redirect to the correct stage if not enough authenticated\n useEffect(() => {\n if (state) {\n const redirectionSuffix = redirectionURL\n ? `?rd=${encodeURIComponent(redirectionURL)}`\n : '';\n\n if (state.authentication_level === AuthenticationLevel.Unauthenticated) {\n setFirstFactorDisabled(false);\n redirect(`${FirstFactorRoute}${redirectionSuffix}`);\n } else if (state.authentication_level >= AuthenticationLevel.OneFactor && userInfo && configuration) {\n if (!configuration.second_factor_enabled) {\n redirect(AuthenticatedRoute);\n } else {\n if (userInfo.method === SecondFactorMethod.U2F) {\n redirect(`${SecondFactorU2FRoute}${redirectionSuffix}`);\n } else if (userInfo.method === SecondFactorMethod.MobilePush) {\n redirect(`${SecondFactorPushRoute}${redirectionSuffix}`);\n } else {\n redirect(`${SecondFactorTOTPRoute}${redirectionSuffix}`);\n }\n }\n }\n }\n }, [state, redirectionURL, redirect, userInfo, setFirstFactorDisabled, configuration]);\n\n const handleAuthSuccess = async (redirectionURL: string | undefined) => {\n if (redirectionURL) {\n // Do an external redirection pushed by the server.\n window.location.href = redirectionURL;\n } else {\n // Refresh state\n fetchState();\n }\n }\n\n const firstFactorReady = state !== undefined &&\n state.authentication_level === AuthenticationLevel.Unauthenticated &&\n location.pathname === FirstFactorRoute;\n\n return (\n \n \n \n setFirstFactorDisabled(true)}\n onAuthenticationFailure={() => setFirstFactorDisabled(false)}\n onAuthenticationSuccess={handleAuthSuccess} />\n \n \n \n {state && userInfo && configuration ? fetchUserInfo()}\n onAuthenticationSuccess={handleAuthSuccess} /> : null}\n \n \n {userInfo ? : null}\n \n \n \n \n \n )\n}\n\nexport default LoginPortal\n\ninterface ComponentOrLoadingProps {\n ready: boolean;\n\n children: ReactNode;\n}\n\nfunction ComponentOrLoading(props: ComponentOrLoadingProps) {\n return (\n \n
\n \n
\n {props.ready ? props.children : null}\n
\n )\n}","import { getState } from \"../services/State\";\nimport { useRemoteCall } from \"./RemoteCall\";\n\nexport function useAutheliaState() {\n return useRemoteCall(getState, []);\n}","import { getUserPreferences } from \"../services/UserPreferences\";\nimport { useRemoteCall } from \"./RemoteCall\";\n\nexport function useUserPreferences() {\n return useRemoteCall(getUserPreferences, []);\n}","import { useRemoteCall } from \"./RemoteCall\";\nimport { getConfiguration } from \"../services/Configuration\";\n\nexport function useConfiguration() {\n return useRemoteCall(getConfiguration, []);\n}","import React from \"react\";\n\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport ErrorIcon from '@material-ui/icons/Error';\nimport InfoIcon from '@material-ui/icons/Info';\nimport WarningIcon from '@material-ui/icons/Warning';\nimport { makeStyles, SnackbarContent } from \"@material-ui/core\";\nimport { amber, green } from '@material-ui/core/colors';\nimport classnames from \"classnames\";\nimport { SnackbarContentProps } from \"@material-ui/core/SnackbarContent\";\n\nconst variantIcon = {\n success: CheckCircleIcon,\n warning: WarningIcon,\n error: ErrorIcon,\n info: InfoIcon,\n};\n\nexport type Level = keyof typeof variantIcon;\n\nexport interface Props extends SnackbarContentProps {\n className?: string;\n level: Level;\n message: string;\n}\n\nconst ColoredSnackbarContent = function (props: Props) {\n const classes = useStyles();\n const Icon = variantIcon[props.level];\n\n const { className, variant, message, ...others } = props;\n\n return (\n \n \n {message}\n \n }\n {...others} />\n )\n}\n\nexport default ColoredSnackbarContent\n\nconst useStyles = makeStyles(theme => ({\n success: {\n backgroundColor: green[600],\n },\n error: {\n backgroundColor: theme.palette.error.dark,\n },\n info: {\n backgroundColor: theme.palette.primary.main,\n },\n warning: {\n backgroundColor: amber[700],\n },\n icon: {\n fontSize: 20,\n },\n iconVariant: {\n opacity: 0.9,\n marginRight: theme.spacing(1),\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n },\n}))","import React, { useState, useEffect } from \"react\";\nimport { Snackbar } from \"@material-ui/core\";\nimport ColoredSnackbarContent from \"./ColoredSnackbarContent\";\nimport { useNotifications } from \"../hooks/NotificationsContext\";\nimport { Notification } from \"../models/Notifications\";\n\nexport interface Props {\n onClose: () => void;\n}\n\nconst NotificationBar = function (props: Props) {\n const [tmpNotification, setTmpNotification] = useState(null as Notification | null);\n const { notification } = useNotifications();\n\n useEffect(() => {\n if (notification && notification !== null) {\n setTmpNotification(notification);\n }\n }, [notification]);\n\n const shouldSnackbarBeOpen = notification !== undefined && notification !== null;\n\n return (\n setTmpNotification(null)}>\n \n \n )\n}\n\nexport default NotificationBar","import { PostWithOptionalResponse } from \"./Client\";\nimport { LogoutPath } from \"./Api\";\n\nexport async function signOut() {\n return PostWithOptionalResponse(LogoutPath);\n}","import React, { useEffect, useCallback, useState } from \"react\";\nimport LoginLayout from \"../../../layouts/LoginLayout\";\nimport { useNotifications } from \"../../../hooks/NotificationsContext\";\nimport { signOut } from \"../../../services/SignOut\";\nimport { Typography, makeStyles } from \"@material-ui/core\";\nimport { Redirect } from \"react-router\";\nimport { FirstFactorRoute } from \"../../../Routes\";\nimport { useRedirectionURL } from \"../../../hooks/RedirectionURL\";\nimport { useIsMountedRef } from \"../../../hooks/Mounted\";\n\nexport interface Props { }\n\nconst SignOut = function (props: Props) {\n const mounted = useIsMountedRef();\n const style = useStyles();\n const { createErrorNotification } = useNotifications();\n const redirectionURL = useRedirectionURL();\n const [timedOut, setTimedOut] = useState(false);\n\n const doSignOut = useCallback(async () => {\n try {\n // TODO(c.michaud): pass redirection URL to backend for validation.\n await signOut();\n setTimeout(() => {\n if (!mounted) {\n return;\n }\n setTimedOut(true);\n }, 2000);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was an issue signing out\");\n }\n }, [createErrorNotification, setTimedOut, mounted]);\n\n useEffect(() => { doSignOut() }, [doSignOut]);\n\n if (timedOut) {\n if (redirectionURL) {\n window.location.href = redirectionURL;\n } else {\n return \n }\n }\n\n return (\n \n \n You're being signed out and redirected...\n \n \n )\n}\n\nexport default SignOut\n\nconst useStyles = makeStyles(theme => ({\n typo: {\n padding: theme.spacing(),\n }\n}))","import React, { useState } from 'react';\nimport {\n BrowserRouter as Router, Route, Switch, Redirect\n} from \"react-router-dom\";\nimport ResetPasswordStep1 from './views/ResetPassword/ResetPasswordStep1';\nimport ResetPasswordStep2 from './views/ResetPassword/ResetPasswordStep2';\nimport RegisterSecurityKey from './views/DeviceRegistration/RegisterSecurityKey';\nimport RegisterOneTimePassword from './views/DeviceRegistration/RegisterOneTimePassword';\nimport {\n FirstFactorRoute, ResetPasswordStep2Route,\n ResetPasswordStep1Route, RegisterSecurityKeyRoute,\n RegisterOneTimePasswordRoute,\n LogoutRoute,\n} from \"./Routes\";\nimport LoginPortal from './views/LoginPortal/LoginPortal';\nimport NotificationsContext from './hooks/NotificationsContext';\nimport { Notification } from './models/Notifications';\nimport NotificationBar from './components/NotificationBar';\nimport SignOut from './views/LoginPortal/SignOut/SignOut';\nimport { getRememberMe, getResetPassword } from './utils/Configuration';\nimport '@fortawesome/fontawesome-svg-core/styles.css'\nimport { config as faConfig } from '@fortawesome/fontawesome-svg-core';\nimport { getBasePath } from './utils/BasePath';\n\nfaConfig.autoAddCss = false;\n\nconst App: React.FC = () => {\n const [notification, setNotification] = useState(null as Notification | null);\n\n return (\n \n \n setNotification(null)} />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import './utils/AssetPath';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"hand\":\"FingerTouchIcon_hand__fZM01\",\"strong\":\"FingerTouchIcon_strong__XLkjn\",\"shaking\":\"FingerTouchIcon_shaking__2J7jA\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wiggle\":\"PushNotificationIcon_wiggle__kPe3e\"};"],"sourceRoot":""}