{"version":3,"sources":["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","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","views/LoginPortal/SecondFactor/MethodContainer.tsx","components/SuccessIcon.tsx","components/InformationIcon.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/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","components/Tracker.tsx","App.tsx","hooks/Tracking.tsx","serviceWorker.ts","index.tsx","components/FingerTouchIcon.module.css","assets/images/googleplay-badge.svg","assets/images/applestore-badge.svg","components/PushNotificationIcon.module.css"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","createElement","d","_ref3","_ref4","_ref5","_ref6","_ref7","_ref8","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","_ref","svgRef","title","props","id","x","y","viewBox","style","enableBackground","xmlSpace","ref","ForwardRef","forwardRef","useStyles","Grid","className","root","container","spacing","alignItems","justify","Container","maxWidth","item","xs","icon","Typography","variant","body","children","showBrand","Link","href","poweredBy","makeStyles","theme","minHeight","textAlign","margin","width","fontSize","color","grey","defaultOptions","timeout","NotificationsContext","createContext","notification","setNotification","useNotifications","useNotificationsProps","useContext","notificationBuilder","level","message","createInfoNotification","useCallback","createSuccessNotification","createWarnNotification","createErrorNotification","isActive","resetNotification","FirstFactorPath","InitiateTOTPRegistrationPath","CompleteTOTPRegistrationPath","InitiateU2FRegistrationPath","CompleteU2FRegistrationStep1Path","CompleteU2FRegistrationStep2Path","InitiateU2FSignInPath","CompleteU2FSignInPath","CompletePushNotificationSignInPath","CompleteTOTPSignInPath","InitiateResetPasswordPath","CompleteResetPasswordPath","ResetPasswordPath","LogoutPath","StatePath","UserInfoPath","UserInfo2FAMethodPath","ConfigurationPath","ExtendedConfigurationPath","toData","resp","data","hasServiceError","errResp","toErrorResponse","status","PostWithOptionalResponse","path","a","axios","post","res","Error","Post","Get","get","initiateResetPasswordProcess","username","completeResetPasswordProcess","token","resetPassword","newPassword","password","TextField","InputLabelProps","classes","label","backgroundColor","palette","background","default","paddingLeft","paddingRight","useState","setUsername","error","setError","history","useHistory","doInitiateResetPasswordProcess","LoginLayout","FixedTextField","fullWidth","value","onChange","e","onKeyPress","ev","preventDefault","Button","onClick","push","marginTop","marginBottom","extractIdentityToken","locationSearch","queryParams","queryString","parse","location","useLocation","formDisabled","setFormDisabled","password1","setPassword1","password2","setPassword2","errorPassword1","setErrorPassword1","errorPassword2","setErrorPassword2","processToken","search","completeProcess","console","useEffect","doResetPassword","setTimeout","type","disabled","classnames","name","shakingClass","animated","shaking","undefined","strong","size","height","hand","wave","initiateTOTPRegistrationProcess","completeTOTPRegistrationProcess","initiateU2FRegistrationProcess","completeU2FRegistrationProcessStep1","completeU2FRegistrationProcessStep2","response","setRegistrationInProgress","handleBackClick","registerStep1","registerRequests","r","appId","challenge","version","u2fApi","register","registerResponse","FingerTouchIcon","instruction","paddingTop","paddingBottom","targetBlank","iconSize","googlePlayLink","src","GooglePlay","alt","appleStoreLink","AppleStore","GoogleAuthenticator","secretURL","setSecretURL","secretBase32","setSecretBase32","hasErrored","setHasErrored","isLoading","setIsLoading","completeRegistrationProcess","secret","otpauth_url","base32_secret","qrcodeFuzzyStyle","fuzzy","googleAuthenticator","googleAuthenticatorText","AppStoreBadges","googleAuthenticatorBadges","qrcodeContainer","qrcode","CircularProgress","loader","failureIcon","faTimesCircle","display","doneButton","filter","typography","position","top","left","red","postFirstFactor","rememberMe","targetURL","keepMeLoggedIn","useRedirectionURL","redirectionURL","setRememberMe","usernameError","setUsernameError","setPassword","passwordError","setPasswordError","handleSignIn","onAuthenticationStart","onAuthenticationSuccess","redirect","onAuthenticationFailure","required","v","onFocus","leftAlign","actionRow","FormControlLabel","control","Checkbox","checked","component","resetLink","flexDirection","cursor","flexGrow","rightAlign","verticalAlign","SecondFactorMethod","wiggleClass","classname","activeMilliseconds","inactiveMillisecond","startMillisecond","currentClass","setCurrentClass","firstTime","setFirstTime","clearTimeout","useIntermittentClass","wiggle","maxProgress","cx","cy","fill","stroke","strokeWidth","strokeDasharray","progress","transform","useTheme","pieChartIcon","PieChartIcon","primary","main","Dialog","open","onClose","DialogContent","methods","has","TOTP","MethodItem","method","U2F","u2fSupported","MobilePush","PushNotificationIcon","DialogActions","buttonRoot","State","faCheckCircle","faInfoCircle","stateClass","state","ALREADY_AUTHENTICATED","AlreadyAuthenticatedContainer","NOT_REGISTERED","NotRegisteredContainer","METHOD","explanation","containerFlex","onRegisterClick","flexWrap","alignContent","justifyContent","flex","SuccessIcon","InformationIcon","MethodContainer","initiateU2FSignin","completeU2FSignin","signResponse","useIsMountedRef","isMountedRef","useRef","current","AuthenticationLevel","progressRoot","transition","LinearProgress","bar1Determinate","iconContainer","context","getState","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","IconWithContext","LinearProgressBar","failure","FailureIcon","timeProgress","setTimeProgress","initialValue","Math","floor","getSeconds","interval","ms","getMilliseconds","dial","otpInput","passcode","numInputs","isDisabled","InProgress","Success","inputStyle","otpDigitInput","inputError","padding","marginLeft","marginRight","borderRadius","border","TimerIcon","completeTOTPSignIn","setPasscode","Idle","signInFunc","passcodeStr","OTPDial","completePushNotificationSignIn","SignInInProgress","toEnum","toString","getUserPreferences","setPrefered2FAMethod","methodSelectionOpen","setMethodSelectionOpen","registrationInProgress","setU2fSupported","ensureSupport","then","initiateRegistration","initiateRegistrationFunc","handleMethodSelected","onMethodChanged","MethodSelectionDialog","configuration","available_methods","methodContainer","exact","OneTimePasswordMethod","userInfo","has_totp","err","SecurityKeyMethod","has_u2f","PushNotificationMethod","to","useRemoteCall","fn","deps","setData","inProgress","setInProgress","fnCallback","getConfiguration","getExtendedConfiguration","config","Set","map","firstFactorDisabled","setFirstFactorDisabled","fetchState","fetchStateError","fetchUserInfo","fetchUserInfoError","fetchConfiguration","fetchConfigurationError","url","authentication_level","OneFactor","Unauthenticated","redirectionSuffix","encodeURI","handleFirstFactorSuccess","window","handleSecondFactorSuccess","firstFactorReady","pathname","ComponentOrLoading","ready","FirstFactorForm","SecondFactorForm","LoadingPage","variantIcon","success","CheckCircleIcon","warning","WarningIcon","ErrorIcon","info","InfoIcon","others","SnackbarContent","iconVariant","green","dark","amber","opacity","tmpNotification","setTmpNotification","shouldSnackbarBeOpen","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","onExited","ColoredSnackbarContent","signOut","timedOut","setTimedOut","doSignOut","typo","trackPage","page","tracker","ReactGA","set","pageview","initialize","App","fetchConfig","fetchConfigError","trackingIds","setTrackingIds","ga_tracking_id","trackingId","useTracking","Provider","Tracker","NotificationBar","ResetPasswordStep1","ResetPasswordStep2","RegisterSecurityKey","RegisterOneTimePassword","SignOut","LoginPortal","Boolean","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","registration","unregister","module","exports"],"mappings":"wSAAA,SAASA,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,SAASS,EAAyBP,EAAQQ,GAAY,GAAc,MAAVR,EAAgB,MAAO,GAAI,IAAkEC,EAAKJ,EAAnED,EAEzF,SAAuCI,EAAQQ,GAAY,GAAc,MAAVR,EAAgB,MAAO,GAAI,IAA2DC,EAAKJ,EAA5DD,EAAS,GAAQa,EAAaf,OAAOgB,KAAKV,GAAqB,IAAKH,EAAI,EAAGA,EAAIY,EAAWV,OAAQF,IAAOI,EAAMQ,EAAWZ,GAAQW,EAASG,QAAQV,IAAQ,IAAaL,EAAOK,GAAOD,EAAOC,IAAQ,OAAOL,EAFxMgB,CAA8BZ,EAAQQ,GAAuB,GAAId,OAAOmB,sBAAuB,CAAE,IAAIC,EAAmBpB,OA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C,KlDlCQ,wBkDkCuBiW,OAAK,GACvC,kBAAC6F,GAAD,OAEJ,kBAAC,IAAD,CAAO9b,KlDpCQ,wBkDoCuBiW,OAAK,GACvC,kBAAC8F,GAAD,OAEJ,kBAAC,IAAD,CAAO/b,KlDtCS,yBkDsCuBiW,OAAK,GACxC,kBAAC+F,GAAD,OAEJ,kBAAC,IAAD,CAAOhc,KlDxCa,8BkDwCuBiW,OAAK,GAC5C,kBAACgG,GAAD,OAEJ,kBAAC,IAAD,CAAOjc,KlD1CJ,UkD0CuBiW,OAAK,GAC3B,kBAACiG,GAAD,OAEJ,kBAAC,IAAD,CAAOlc,KlDxDC,KkDyDJ,kBAACmc,GAAD,OAEJ,kBAAC,IAAD,CAAOnc,KAAK,KACR,kBAAC,IAAD,CAAUyW,GlD5DN,YoDWZ2F,QACW,cAA7B/D,OAAOjV,SAASiZ,UAEe,UAA7BhE,OAAOjV,SAASiZ,UAEhBhE,OAAOjV,SAASiZ,SAASC,MACvB,2DCZNC,IAASC,OAAO,kBAAC,GAAD,MAASC,SAASC,eAAe,SDmI3C,kBAAmBC,WACrBA,UAAUC,cAAclE,MAAMlD,MAAK,SAAAqH,GACjCA,EAAaC,iB,mBE1InBC,EAAOC,QAAU,CAAC,KAAO,8BAA8B,OAAS,gCAAgC,QAAU,mC,mBCD1GD,EAAOC,QAAU,IAA0B,8C,mBCA3CD,EAAOC,QAAU,IAA0B,8C,mBCC3CD,EAAOC,QAAU,CAAC,OAAS,wC","file":"static/js/main.af8e8a56.chunk.js","sourcesContent":["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 React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.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 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref6 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref7 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref8 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref9 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref10 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref11 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref12 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref13 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref14 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref15 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref16 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar _ref17 =\n/*#__PURE__*/\nReact.createElement(\"g\", null);\n\nvar SvgUser = function SvgUser(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return 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 }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgUser, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/user.9bf531f6.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\nexport default 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\nconst useStyles = makeStyles(theme => ({\n root: {\n minHeight: '90vh',\n textAlign: \"center\",\n // marginTop: theme.spacing(10),\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 const createInfoNotification = useCallback(notificationBuilder(\"info\"), []);\n const createSuccessNotification = useCallback(notificationBuilder(\"success\"), []);\n const createWarnNotification = useCallback(notificationBuilder(\"warning\"), []);\n const createErrorNotification = useCallback(notificationBuilder(\"error\"), []);\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\";\n\nexport const FirstFactorPath = \"/api/firstfactor\";\nexport const InitiateTOTPRegistrationPath = \"/api/secondfactor/totp/identity/start\";\nexport const CompleteTOTPRegistrationPath = \"/api/secondfactor/totp/identity/finish\";\n\nexport const InitiateU2FRegistrationPath = \"/api/secondfactor/u2f/identity/start\";\nexport const CompleteU2FRegistrationStep1Path = \"/api/secondfactor/u2f/identity/finish\";\nexport const CompleteU2FRegistrationStep2Path = \"/api/secondfactor/u2f/register\";\n\nexport const InitiateU2FSignInPath = \"/api/secondfactor/u2f/sign_request\";\nexport const CompleteU2FSignInPath = \"/api/secondfactor/u2f/sign\";\n\nexport const CompletePushNotificationSignInPath = \"/api/secondfactor/duo\"\nexport const CompleteTOTPSignInPath = \"/api/secondfactor/totp\"\n\nexport const InitiateResetPasswordPath = \"/api/reset-password/identity/start\";\nexport const CompleteResetPasswordPath = \"/api/reset-password/identity/finish\";\n// Do the password reset during completion.\nexport const ResetPasswordPath = \"/api/reset-password\"\n\nexport const LogoutPath = \"/api/logout\";\nexport const StatePath = \"/api/state\";\nexport const UserInfoPath = \"/api/user/info\";\nexport const UserInfo2FAMethodPath = \"/api/user/info/2fa_method\";\nexport const Available2FAMethodsPath = \"/api/secondfactor/available\";\n\nexport const ConfigurationPath = \"/api/configuration\";\nexport const ExtendedConfigurationPath = \"/api/configuration/extended\";\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) {\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 = \"/\";\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 */\nexport default function (props: TextFieldProps) {\n const style = useStyles();\n return (\n \n {props.children}\n \n );\n}\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\nexport default 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\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\nexport default 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\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\nexport default 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}","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\nexport default 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\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}))","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\nexport default 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}","\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};\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\nexport default 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\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, { 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\n onAuthenticationStart: () => void;\n onAuthenticationFailure: () => void;\n onAuthenticationSuccess: (redirectURL: string | undefined) => void;\n}\n\nexport default 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\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 \"There was a problem. Username or password might be incorrect.\");\n props.onAuthenticationFailure();\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 \n \n setPassword(v.target.value)}\n onFocus={() => setPasswordError(false)}\n type=\"password\"\n onKeyPress={(ev) => {\n if (ev.key === 'Enter') {\n handleSignIn();\n ev.preventDefault();\n }\n }} />\n \n \n \n }\n className={style.rememberMe}\n label=\"Remember me\"\n />\n \n Reset password?\n \n \n \n \n Sign in\n \n \n \n \n )\n}\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 },\n rememberMe: {\n flexGrow: 1,\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\nexport default function (props: Props) {\n const idleMilliseconds = 2500;\n const wiggleMilliseconds = 500;\n const startMilliseconds = 500;\n const wiggleClass = (props.animated) ? useIntermittentClass(style.wiggle, wiggleMilliseconds, idleMilliseconds, startMilliseconds) : \"\";\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}","\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\nexport default 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}","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\nexport default 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\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, { ReactNode, Fragment } from \"react\";\nimport { makeStyles, Typography, Link, useTheme } from \"@material-ui/core\";\nimport SuccessIcon from \"../../../components/SuccessIcon\";\nimport InformationIcon from \"../../../components/InformationIcon\";\nimport classnames from \"classnames\";\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\nexport default 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 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\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 AlreadyAuthenticatedContainer() {\n const theme = useTheme();\n return (\n \n
\n Authenticated!\n
\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\nexport interface Props { }\n\nexport default function (props: Props) {\n return (\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\nexport default function (props: Props) {\n return (\n \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 function getState() {\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\nexport default 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 const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\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\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\nexport default 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","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTimesCircle } from \"@fortawesome/free-regular-svg-icons\";\n\nexport interface Props { }\n\nexport default function (props: Props) {\n return (\n \n )\n}","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\nexport default 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}","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\n onRegisterClick: () => void;\n onSignInError: (err: Error) => void;\n onSignInSuccess: (redirectURL: string | undefined) => void;\n}\n\nexport default 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 const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\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}","import React, { useState, useEffect } from \"react\";\nimport PieChartIcon from \"./PieChartIcon\";\n\nexport interface Props {\n width: number;\n height: number;\n\n color?: string;\n backgroundColor?: string;\n}\n\nexport default function (props: Props) {\n const maxTimeProgress = 1000;\n const [timeProgress, setTimeProgress] = useState(0);\n\n useEffect(() => {\n // Get the current number of seconds to initialize timer.\n const initialValue = Math.floor((new Date().getSeconds() % 30) / 30 * maxTimeProgress);\n setTimeProgress(initialValue);\n\n const interval = setInterval(() => {\n const ms = new Date().getSeconds() * 1000.0 + new Date().getMilliseconds();\n const value = (ms % 30000) / 30000 * maxTimeProgress;\n setTimeProgress(value);\n }, 100);\n return () => clearInterval(interval);\n }, []);\n\n return (\n \n )\n}\n\n","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\n onChange: (passcode: string) => void;\n}\n\nexport default function (props: Props) {\n const style = useStyles();\n\n const dial = (\n \n \n \n )\n\n return (\n }\n context={dial} />\n )\n}\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}\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\nexport default 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 const onSignInErrorCallback = useCallback(onSignInError, []);\n const onSignInSuccessCallback = useCallback(onSignInSuccess, []);\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\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 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 setPrefered2FAMethod(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 { setPrefered2FAMethod } from \"../../../services/UserPreferences\";\nimport { UserInfo } from \"../../../models/UserInfo\";\nimport { ExtendedConfiguration } 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 username: string;\n authenticationLevel: AuthenticationLevel;\n\n userInfo: UserInfo;\n configuration: ExtendedConfiguration;\n\n onMethodChanged: (method: SecondFactorMethod) => void;\n onAuthenticationSuccess: (redirectURL: string | undefined) => void;\n}\n\nexport default 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(() => { u2fApi.ensureSupport().then(() => setU2fSupported(true)) }, [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 setPrefered2FAMethod(method);\n setMethodSelectionOpen(false);\n props.onMethodChanged(method);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"There was an issue updating prefered 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\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, 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\nexport default function () {\n return (\n \n \n \n Loading...\n \n \n );\n}","import { Get } from \"./Client\";\nimport { ExtendedConfigurationPath, ConfigurationPath } from \"./Api\";\nimport { toEnum, Method2FA } from \"./UserPreferences\";\nimport { Configuration, ExtendedConfiguration } from \"../models/Configuration\";\n\nexport async function getConfiguration(): Promise {\n return Get(ConfigurationPath);\n}\n\ninterface ExtendedConfigurationPayload {\n available_methods: Method2FA[];\n}\n\nexport async function getExtendedConfiguration(): Promise {\n const config = await Get(ExtendedConfigurationPath);\n return { ...config, available_methods: new Set(config.available_methods.map(toEnum)) };\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\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 { useExtendedConfiguration } from \"../../hooks/Configuration\";\n\nexport default function () {\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] = useExtendedConfiguration();\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=${encodeURI(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) {\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 }, [state, redirectionURL, redirect, userInfo, setFirstFactorDisabled]);\n\n const handleFirstFactorSuccess = 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 handleSecondFactorSuccess = async (redirectionURL: string | undefined) => {\n if (redirectionURL) {\n // Do an external redirection pushed by the server.\n window.location.href = redirectionURL;\n } else {\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={handleFirstFactorSuccess} />\n \n \n \n {state && userInfo && configuration ? fetchUserInfo()}\n onAuthenticationSuccess={handleSecondFactorSuccess} /> : null}\n \n \n \n \n \n )\n}\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, getExtendedConfiguration } from \"../services/Configuration\";\n\nexport function useConfiguration() {\n return useRemoteCall(getConfiguration, []);\n}\n\nexport function useExtendedConfiguration() {\n return useRemoteCall(getExtendedConfiguration, []);\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 variant: Level;\n message: string;\n}\n\nexport default function (props: Props) {\n const classes = useStyles();\n const Icon = variantIcon[props.variant];\n\n const { className, variant, message, ...others } = props;\n\n return (\n \n \n {message}\n \n }\n {...others} />\n )\n}\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\nexport default 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}","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\nexport default 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\nconst useStyles = makeStyles(theme => ({\n typo: {\n padding: theme.spacing(),\n }\n}))","import React, { useEffect, useCallback, Fragment, ReactNode } from \"react\";\nimport { useLocation } from \"react-router\";\nimport ReactGA, { Tracker } from \"react-ga\";\n\nexport interface Props {\n tracker: Tracker | undefined;\n children?: ReactNode;\n}\n\nexport default function (props: Props) {\n const location = useLocation();\n\n const trackPage = useCallback((page: string) => {\n if (props.tracker) {\n ReactGA.set({ page });\n ReactGA.pageview(page);\n }\n }, [props.tracker]);\n\n useEffect(() => {\n if (props.tracker) {\n ReactGA.initialize([props.tracker]);\n }\n }, [props.tracker]);\n\n useEffect(() => {\n trackPage(location.pathname + location.search);\n }, [trackPage, location.pathname, location.search]);\n\n return (\n \n {props.children}\n \n )\n}","import React, { useState, useEffect } 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 { useConfiguration } from './hooks/Configuration';\nimport Tracker from \"./components/Tracker\";\nimport { useTracking } from \"./hooks/Tracking\";\n\nconst App: React.FC = () => {\n const [notification, setNotification] = useState(null as Notification | null);\n const [configuration, fetchConfig, , fetchConfigError] = useConfiguration();\n const tracker = useTracking(configuration);\n\n useEffect(() => {\n if (fetchConfigError) {\n console.error(fetchConfigError);\n }\n }, [fetchConfigError]);\n\n useEffect(() => { fetchConfig() }, [fetchConfig]);\n\n return (\n \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}\n\nexport default App;\n","import { useState, useEffect } from \"react\";\nimport { Configuration } from \"../models/Configuration\";\nimport { Tracker } from \"react-ga\";\n\nexport function useTracking(configuration: Configuration | undefined) {\n const [trackingIds, setTrackingIds] = useState(undefined as Tracker | undefined);\n\n useEffect(() => {\n if (configuration && configuration.ga_tracking_id) {\n setTrackingIds({ trackingId: configuration.ga_tracking_id });\n }\n }, [configuration]);\n\n return trackingIds;\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 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\"};","module.exports = __webpack_public_path__ + \"static/media/googleplay-badge.56b44686.svg\";","module.exports = __webpack_public_path__ + \"static/media/applestore-badge.d0558d91.svg\";","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wiggle\":\"PushNotificationIcon_wiggle__kPe3e\"};"],"sourceRoot":""}