{"version":3,"sources":["components/PushNotificationIcon.module.css","utils/Configuration.ts","utils/BasePath.ts","utils/AssetPath.ts","components/ColoredSnackbarContent.tsx","hooks/NotificationsContext.ts","components/NotificationBar.tsx","assets/images/user.svg","constants/Routes.ts","themes/Light.ts","themes/Dark.ts","themes/Grey.ts","assets/images/applestore-badge.svg","assets/images/googleplay-badge.svg","components/AppStoreBadges.tsx","constants/constants.ts","layouts/LoginLayout.tsx","services/Api.ts","services/Client.ts","services/RegisterDevice.ts","utils/IdentityToken.ts","views/DeviceRegistration/RegisterOneTimePassword.tsx","components/FingerTouchIcon.tsx","views/DeviceRegistration/RegisterSecurityKey.tsx","hooks/RemoteCall.ts","services/Consent.ts","hooks/Redirector.ts","views/LoadingPage/LoadingPage.tsx","views/LoginPortal/ConsentView/ConsentView.tsx","models/Methods.ts","services/State.ts","hooks/Consent.ts","services/UserPreferences.ts","services/Configuration.ts","hooks/RedirectionURL.ts","hooks/RequestMethod.ts","services/SafeRedirection.ts","components/SuccessIcon.tsx","views/LoginPortal/Authenticated.tsx","views/LoginPortal/AuthenticatedView/AuthenticatedView.tsx","components/FixedTextField.tsx","services/FirstFactor.ts","views/LoginPortal/FirstFactor/FirstFactorForm.tsx","components/PushNotificationIcon.tsx","hooks/IntermittentClass.ts","components/PieChartIcon.tsx","components/TimerIcon.tsx","views/LoginPortal/SecondFactor/MethodSelectionDialog.tsx","services/OneTimePassword.ts","components/InformationIcon.tsx","views/LoginPortal/SecondFactor/MethodContainer.tsx","views/LoginPortal/SecondFactor/OneTimePasswordMethod.tsx","views/LoginPortal/SecondFactor/IconWithContext.tsx","views/LoginPortal/SecondFactor/OTPDial.tsx","views/LoginPortal/SecondFactor/PushNotificationMethod.tsx","components/FailureIcon.tsx","hooks/Mounted.ts","services/PushNotification.ts","views/LoginPortal/SecondFactor/SecurityKeyMethod.tsx","components/LinearProgressBar.tsx","services/SecurityKey.ts","hooks/Timer.ts","views/LoginPortal/SecondFactor/SecondFactorForm.tsx","views/LoginPortal/LoginPortal.tsx","hooks/State.ts","hooks/UserInfo.ts","hooks/Configuration.ts","services/SignOut.ts","views/LoginPortal/SignOut/SignOut.tsx","services/ResetPassword.ts","views/ResetPassword/ResetPasswordStep1.tsx","views/ResetPassword/ResetPasswordStep2.tsx","App.tsx","serviceWorker.ts","index.tsx","components/FingerTouchIcon.module.css"],"names":["module","exports","getEmbeddedVariable","variableName","value","document","body","getAttribute","Error","getTheme","getBasePath","__webpack_public_path__","variantIcon","success","CheckCircleIcon","warning","WarningIcon","error","ErrorIcon","info","InfoIcon","ColoredSnackbarContent","props","classes","useStyles","Icon","level","className","message","variant","others","SnackbarContent","classnames","icon","iconVariant","makeStyles","theme","backgroundColor","green","palette","dark","primary","main","amber","fontSize","opacity","marginRight","spacing","display","alignItems","defaultOptions","NotificationsContext","createContext","notification","setNotification","useNotifications","useNotificationsProps","useContext","notificationBuilder","timeout","createInfoNotification","useCallback","createSuccessNotification","createWarnNotification","createErrorNotification","isActive","resetNotification","_path","NotificationBar","useState","tmpNotification","setTmpNotification","useEffect","shouldSnackbarBeOpen","undefined","Snackbar","open","anchorOrigin","vertical","horizontal","autoHideDuration","onClose","TransitionProps","onExited","FirstFactorRoute","AuthenticatedRoute","SecondFactorRoute","SecondFactorU2FRoute","SecondFactorTOTPRoute","SecondFactorPushRoute","ResetPasswordStep1Route","LogoutRoute","Light","createTheme","custom","loadingBar","background","default","paper","Dark","type","Grey","overrides","MuiCssBaseline","color","MuiOutlinedInput","root","borderColor","borderWidth","notchedOutline","MuiCheckbox","MuiInputBase","input","MuiInputLabel","AppStoreBadges","target","targetBlank","width","iconSize","Link","href","googlePlayLink","src","GooglePlay","alt","style","appleStoreLink","AppleStore","GoogleAuthenticator","_extends","Object","assign","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgUser","_ref","svgRef","title","titleId","id","xmlns","xmlnsXlink","x","y","viewBox","enableBackground","xmlSpace","ref","d","ForwardRef","LoginLayout","Grid","container","justify","Container","maxWidth","rootContainer","item","xs","Typography","children","showBrand","poweredBy","minHeight","textAlign","paddingLeft","paddingRight","margin","fill","marginTop","paddingTop","paddingBottom","grey","basePath","ConsentPath","FirstFactorPath","InitiateTOTPRegistrationPath","CompleteTOTPRegistrationPath","InitiateU2FRegistrationPath","CompleteU2FRegistrationStep1Path","CompleteU2FRegistrationStep2Path","InitiateU2FSignInPath","CompleteU2FSignInPath","CompletePushNotificationSignInPath","CompleteTOTPSignInPath","InitiateResetPasswordPath","CompleteResetPasswordPath","ResetPasswordPath","ChecksSafeRedirectionPath","LogoutPath","StatePath","UserInfoPath","UserInfo2FAMethodPath","ConfigurationPath","toData","resp","data","hasServiceError","errResp","toErrorResponse","status","errored","PostWithOptionalResponse","path","a","axios","post","res","Post","Get","get","initiateTOTPRegistrationProcess","completeTOTPRegistrationProcess","processToken","token","initiateU2FRegistrationProcess","completeU2FRegistrationProcessStep1","completeU2FRegistrationProcessStep2","response","extractIdentityToken","locationSearch","queryParams","queryString","parse","RegisterOneTimePassword","history","useHistory","location","useLocation","secretURL","setSecretURL","secretBase32","setSecretBase32","hasErrored","setHasErrored","isLoading","setIsLoading","search","completeRegistrationProcess","secret","otpauth_url","base32_secret","console","SecretButton","text","action","IconButton","secretButtons","onClick","navigator","clipboard","writeText","qrcodeFuzzyStyle","fuzzy","googleAuthenticator","googleAuthenticatorText","googleAuthenticatorBadges","qrcodeContainer","qrcode","size","CircularProgress","loader","failureIcon","faTimesCircle","TextField","label","InputProps","readOnly","faKey","faCopy","Button","doneButton","push","disabled","marginBottom","padding","filter","typography","position","top","left","red","FingerTouchIcon","shakingClass","animated","shaking","strong","height","hand","wave","RegisterSecurityKey","setRegistrationInProgress","handleBackClick","registerStep1","registerRequests","r","appId","challenge","version","u2fApi","register","registerResponse","instruction","useRemoteCall","fn","deps","setData","inProgress","setInProgress","setError","fnCallback","getRequestedScopes","useRedirector","url","window","LoadingPage","useTheme","justifyContent","showListItemAvatar","AccountBox","Contacts","Group","Drafts","CheckBox","SecondFactorMethod","AuthenticationLevel","scopesListContainer","scopesList","clientID","fontWeight","button","marginLeft","bulletIcon","permissionsContainer","border","listItem","ConsentView","redirect","fetch","err","replace","handleAcceptConsent","client_id","accept_or_reject","redirect_uri","handleRejectConsent","ComponentOrLoading","ready","client_description","List","scopes","map","s","Tooltip","name","ListItem","dense","ListItemIcon","ListItemText","description","toEnum","method","U2F","TOTP","MobilePush","toString","getUserPreferences","setPreferred2FAMethod","getConfiguration","config","available_methods","Set","useRedirectionURL","useRequestMethod","getState","checkSafeRedirection","uri","SuccessIcon","faCheckCircle","Authenticated","iconContainer","flex","AuthenticatedView","SignOutRoute","mainContainer","borderRadius","FixedTextField","InputLabelProps","inputProps","autoCapitalize","postFirstFactor","username","password","rememberMe","targetURL","requestMethod","keepMeLoggedIn","FirstFactorForm","redirectionURL","setRememberMe","setUsername","usernameError","setUsernameError","setPassword","passwordError","setPasswordError","usernameRef","useRef","passwordRef","setTimeout","current","focus","clearTimeout","handleSignIn","onAuthenticationStart","onAuthenticationSuccess","onAuthenticationFailure","inputRef","required","fullWidth","onChange","v","onFocus","autoComplete","onKeyPress","ev","preventDefault","actionRow","FormControlLabel","control","Checkbox","checked","resetPassword","flexEnd","component","resetLink","flexDirection","cursor","flexGrow","PushNotificationIcon","wiggleClass","classname","activeMilliseconds","inactiveMillisecond","startMillisecond","currentClass","setCurrentClass","firstTime","setFirstTime","useIntermittentClass","wiggle","PieChartIcon","maxProgress","cx","cy","stroke","strokeWidth","strokeDasharray","progress","transform","TimerIcon","radius","timeProgress","setTimeProgress","initialValue","Date","getTime","period","interval","setInterval","clearInterval","MethodSelectionDialog","pieChartIcon","Dialog","DialogContent","methods","has","MethodItem","u2fSupported","DialogActions","buttonRoot","completeTOTPSignIn","passcode","State","InformationIcon","faInfoCircle","DefaultMethodContainer","registerMessage","registered","stateClass","state","ALREADY_AUTHENTICATED","NOT_REGISTERED","NotRegisteredContainer","METHOD","explanation","containerFlex","onRegisterClick","flexWrap","alignContent","MethodContainer","IconWithContext","context","OTPDial","dial","otpInput","shouldAutoFocus","numInputs","isDisabled","InProgress","Success","isInputNum","Failure","inputStyle","otpDigitInput","inputError","boxSizing","OneTimePasswordMethod","setPasscode","authenticationLevel","TwoFactor","Idle","setState","onSignInSuccess","onSignInError","onSignInErrorCallback","onSignInSuccessCallback","signInFunc","passcodeStr","methodState","MethodContainerState","totp_period","FailureIcon","useIsMountedRef","isMountedRef","completePushNotificationSignIn","PushNotificationMethod","SignInInProgress","mounted","LinearProgressBar","progressRoot","transition","LinearProgress","bar1Determinate","initiateU2FSignin","completeU2FSignin","signResponse","SecurityKeyMethod","WaitTouch","timeoutMs","startDate","setStartDate","percent","setPercent","trigger","clear","intervalNode","p","useTimer","signInTimeout","timerPercent","triggerTimer","doInitiateSignIn","signRequest","signRequests","registeredKeys","keyHandle","sign","SigninInProgress","timer","onRetryClick","progressBarStyle","touch","failure","SecondFactorForm","methodSelectionOpen","setMethodSelectionOpen","registrationInProgress","setU2fSupported","ensureSupport","then","initiateRegistration","initiateRegistrationFunc","handleMethodSelected","onMethodChanged","userInfo","display_name","configuration","methodContainer","exact","has_totp","has_u2f","to","RedirectionErrorMessage","LoginPortal","firstFactorDisabled","setFirstFactorDisabled","redirector","fetchState","fetchStateError","fetchUserInfo","fetchUserInfoError","fetchConfiguration","fetchConfigurationError","authentication_level","OneFactor","Unauthenticated","second_factor_enabled","ok","redirectionSuffix","encodeURIComponent","handleAuthSuccess","firstFactorReady","pathname","signOut","SignOut","timedOut","setTimedOut","safeRedirect","setSafeRedirect","doSignOut","safeTargetURL","typo","initiateResetPasswordProcess","completeResetPasswordProcess","newPassword","ResetPasswordStep1","doInitiateResetPasswordProcess","e","ResetPasswordStep2","formDisabled","setFormDisabled","password1","setPassword1","password2","setPassword2","errorPassword1","setErrorPassword1","errorPassword2","setErrorPassword2","completeProcess","doResetPassword","includes","faConfig","autoAddCss","App","themes","matchMedia","matches","Theme","setTheme","query","addEventListener","ThemeProvider","CssBaseline","Provider","basename","Boolean","hostname","match","ReactDOM","render","getElementById","serviceWorker","registration","unregister"],"mappings":"+EACAA,EAAOC,QAAU,CAAC,OAAS,uC,0FCDpB,SAASC,EAAoBC,GAChC,IAAMC,EAAQC,SAASC,KAAKC,aAAd,eAAmCJ,IACjD,GAAc,OAAVC,EACA,MAAM,IAAII,MAAJ,aAAgBL,EAAhB,gCAGV,OAAOC,EAWJ,SAASK,IACZ,OAAOP,EAAoB,SChBxB,SAASQ,IACZ,OAAOR,EAAoB,YCD/BS,IAA0B,IAEJ,KAAlBD,MACAC,IAA0BD,IAAgB,K,4PCMxCE,EAAc,CAChBC,QAASC,IACTC,QAASC,IACTC,MAAOC,IACPC,KAAMC,KA+BKC,EApBgB,SAAUC,GACrC,IAAMC,EAAUC,IACVC,EAAOb,EAAYU,EAAMI,OAEvBC,EAA2CL,EAA3CK,UAAoBC,GAAuBN,EAAhCO,QAAgCP,EAAvBM,SAAYE,EAAxC,YAAmDR,EAAnD,GAEA,OACI,cAACS,EAAA,EAAD,aACIJ,UAAWK,IAAWT,EAAQD,EAAMI,OAAQC,GAC5CC,QACI,uBAAMD,UAAWJ,EAAQK,QAAzB,UACI,cAACH,EAAD,CAAME,UAAWK,IAAWT,EAAQU,KAAMV,EAAQW,eACjDN,MAGLE,KAOVN,EAAYW,aAAW,SAACC,GAAD,MAAY,CACrCvB,QAAS,CACLwB,gBAAiBC,IAAM,MAE3BrB,MAAO,CACHoB,gBAAiBD,EAAMG,QAAQtB,MAAMuB,MAEzCrB,KAAM,CACFkB,gBAAiBD,EAAMG,QAAQE,QAAQC,MAE3C3B,QAAS,CACLsB,gBAAiBM,IAAM,MAE3BV,KAAM,CACFW,SAAU,IAEdV,YAAa,CACTW,QAAS,GACTC,YAAaV,EAAMW,QAAQ,IAE/BnB,QAAS,CACLoB,QAAS,OACTC,WAAY,cCjEdC,E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V,OAAOvF,SAAS+a,UAEhBxV,OAAOvF,SAAS+a,SAASC,MAAM,2DCRvCC,IAASC,OAAO,cAAC,GAAD,IAASjqB,SAASkqB,eAAe,SDsHzC,kBAAmB7Z,WACnBA,UAAU8Z,cAAc5T,MAAMyO,MAAK,SAACoF,GAChCA,EAAaC,iB,mBEhIzB1qB,EAAOC,QAAU,CAAC,KAAO,8BAA8B,OAAS,gCAAgC,QAAU,oC","file":"static/js/main.d4ddd6e3.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"wiggle\":\"PushNotificationIcon_wiggle__kPe3e\"};","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}\n\nexport function getTheme() {\n return getEmbeddedVariable(\"theme\");\n}\n","import { getEmbeddedVariable } from \"@utils/Configuration\";\n\nexport function getBasePath() {\n return getEmbeddedVariable(\"basepath\");\n}\n","import { getBasePath } from \"@utils/BasePath\";\n\n__webpack_public_path__ = \"/\";\n\nif (getBasePath() !== \"\") {\n __webpack_public_path__ = getBasePath() + \"/\";\n}\n","import React from \"react\";\n\nimport { makeStyles, SnackbarContent } from \"@material-ui/core\";\nimport { amber, green } from \"@material-ui/core/colors\";\nimport { SnackbarContentProps } from \"@material-ui/core/SnackbarContent\";\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 classnames from \"classnames\";\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};\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}));\n","import { useCallback, createContext, useContext } from \"react\";\n\nimport { Level } from \"@components/ColoredSnackbarContent\";\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({ notification: null, setNotification: () => {} });\n\nexport default NotificationsContext;\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,\n 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 return {\n notification: useNotificationsProps.notification,\n resetNotification,\n createInfoNotification,\n createSuccessNotification,\n createWarnNotification,\n createErrorNotification,\n isActive,\n };\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { Snackbar } from \"@material-ui/core\";\n\nimport ColoredSnackbarContent from \"@components/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, setTmpNotification]);\n\n const shouldSnackbarBeOpen = notification !== undefined && notification !== null;\n\n return (\n setTmpNotification(null),\n }}\n >\n \n \n );\n};\n\nexport default NotificationBar;\n","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _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\nfunction SvgUser(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"UserSvg\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\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, _path || (_path = /*#__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}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgUser);\nexport default __webpack_public_path__ + \"static/media/user.8772ccb3.svg\";\nexport { ForwardRef as ReactComponent };","export const FirstFactorRoute: string = \"/\";\nexport const AuthenticatedRoute: string = \"/authenticated\";\nexport const ConsentRoute: string = \"/consent\";\n\nexport const SecondFactorRoute: string = \"/2fa\";\nexport const SecondFactorU2FRoute: string = \"/2fa/security-key\";\nexport const SecondFactorTOTPRoute: string = \"/2fa/one-time-password\";\nexport const SecondFactorPushRoute: string = \"/2fa/push-notification\";\n\nexport const ResetPasswordStep1Route: string = \"/reset-password/step1\";\nexport const ResetPasswordStep2Route: string = \"/reset-password/step2\";\nexport const RegisterSecurityKeyRoute: string = \"/security-key/register\";\nexport const RegisterOneTimePasswordRoute: string = \"/one-time-password/register\";\nexport const LogoutRoute: string = \"/logout\";\n","import { createTheme } from \"@material-ui/core/styles\";\n\nconst Light = createTheme({\n custom: {\n icon: \"#000\",\n loadingBar: \"#000\",\n },\n palette: {\n primary: {\n main: \"#1976d2\",\n },\n background: {\n default: \"#fff\",\n paper: \"#fff\",\n },\n },\n});\n\nexport default Light;\n","import { createTheme } from \"@material-ui/core/styles\";\n\nconst Dark = createTheme({\n custom: {\n icon: \"#fff\",\n loadingBar: \"#fff\",\n },\n palette: {\n type: \"dark\",\n primary: {\n main: \"#1976d2\",\n },\n },\n});\n\nexport default Dark;\n","import { createTheme } from \"@material-ui/core/styles\";\n\nconst Grey = createTheme({\n custom: {\n icon: \"#929aa5\",\n loadingBar: \"#929aa5\",\n },\n palette: {\n primary: {\n main: \"#929aa5\",\n },\n background: {\n default: \"#2f343e\",\n paper: \"#2f343e\",\n },\n },\n overrides: {\n MuiCssBaseline: {\n \"@global\": {\n body: {\n backgroundColor: \"#2f343e\",\n color: \"#929aa5\",\n },\n },\n },\n MuiOutlinedInput: {\n root: {\n \"& $notchedOutline\": {\n borderColor: \"#929aa5\",\n },\n \"&:hover:not($disabled):not($focused):not($error) $notchedOutline\": {\n borderColor: \"#929aa5\",\n borderWidth: 2,\n },\n \"&$focused $notchedOutline\": {\n borderColor: \"#929aa5\",\n },\n },\n notchedOutline: {},\n },\n MuiCheckbox: {\n root: {\n color: \"#929aa5\",\n },\n },\n MuiInputBase: {\n input: {\n color: \"#929aa5\",\n },\n },\n MuiInputLabel: {\n root: {\n color: \"#929aa5\",\n },\n },\n },\n});\n\nexport default Grey;\n","export default __webpack_public_path__ + \"static/media/applestore-badge.15f01eef.svg\";","export default __webpack_public_path__ + \"static/media/googleplay-badge.6577102c.svg\";","import React from \"react\";\n\nimport { Link } from \"@material-ui/core\";\n\nimport AppleStore from \"@assets/images/applestore-badge.svg\";\nimport GooglePlay from \"@assets/images/googleplay-badge.svg\";\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;\n","export 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, { ReactNode } from \"react\";\n\nimport { Grid, makeStyles, Container, Typography, Link } from \"@material-ui/core\";\nimport { grey } from \"@material-ui/core/colors\";\n\nimport { ReactComponent as UserSvg } from \"@assets/images/user.svg\";\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 {props.title ? (\n \n \n {props.title}\n \n \n ) : null}\n \n {props.children}\n \n {props.showBrand ? (\n \n \n Powered by Authelia\n \n \n ) : null}\n \n \n \n );\n};\n\nexport default LoginLayout;\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n minHeight: \"90vh\",\n textAlign: \"center\",\n },\n rootContainer: {\n paddingLeft: 32,\n paddingRight: 32,\n },\n title: {},\n icon: {\n margin: theme.spacing(),\n width: \"64px\",\n fill: theme.custom.icon,\n },\n body: {\n marginTop: theme.spacing(),\n paddingTop: theme.spacing(),\n paddingBottom: theme.spacing(),\n },\n poweredBy: {\n fontSize: \"0.7em\",\n color: grey[500],\n },\n}));\n","import { AxiosResponse } from \"axios\";\n\nimport { getBasePath } from \"@utils/BasePath\";\n\nconst basePath = getBasePath();\n\n// Note: If you change this const you must also do so in the backend at internal/handlers/cost.go.\nexport const ConsentPath = basePath + \"/api/oidc/consent\";\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\";\nexport const ChecksSafeRedirectionPath = basePath + \"/api/checks/safe-redirection\";\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 { errored: true, message: errResp.message };\n }\n return { errored: false, message: null };\n}\n","import axios from \"axios\";\n\nimport { ServiceResponse, hasServiceError, toData } from \"@services/Api\";\n\nexport async function PostWithOptionalResponse(path: string, body?: any): Promise {\n const res = await axios.post>(path, body);\n\n if (res.status !== 200 || hasServiceError(res).errored) {\n throw new Error(`Failed POST to ${path}. Code: ${res.status}. Message: ${hasServiceError(res).message}`);\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).errored) {\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}\n","import U2fApi from \"u2f-api\";\n\nimport {\n InitiateTOTPRegistrationPath,\n CompleteTOTPRegistrationPath,\n InitiateU2FRegistrationPath,\n CompleteU2FRegistrationStep1Path,\n CompleteU2FRegistrationStep2Path,\n} from \"@services/Api\";\nimport { Post, PostWithOptionalResponse } from \"@services/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(CompleteTOTPRegistrationPath, { token: processToken });\n}\n\nexport async function initiateU2FRegistrationProcess() {\n return PostWithOptionalResponse(InitiateU2FRegistrationPath);\n}\n\ninterface U2RRegistrationStep1Response {\n appId: string;\n registerRequests: [\n {\n version: string;\n challenge: string;\n },\n ];\n}\n\nexport async function completeU2FRegistrationProcessStep1(processToken: string) {\n return Post(CompleteU2FRegistrationStep1Path, { token: processToken });\n}\n\nexport async function completeU2FRegistrationProcessStep2(response: U2fApi.RegisterResponse) {\n return PostWithOptionalResponse(CompleteU2FRegistrationStep2Path, response);\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 ? (queryParams[\"token\"] as string) : null;\n}\n","import React, { useEffect, useCallback, useState } from \"react\";\n\nimport { IconDefinition, faCopy, faKey, faTimesCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { makeStyles, Typography, Button, IconButton, Link, CircularProgress, TextField } from \"@material-ui/core\";\nimport { red } from \"@material-ui/core/colors\";\nimport classnames from \"classnames\";\nimport QRCode from \"qrcode.react\";\nimport { useHistory, useLocation } from \"react-router\";\n\nimport AppStoreBadges from \"@components/AppStoreBadges\";\nimport { GoogleAuthenticator } from \"@constants/constants\";\nimport { FirstFactorRoute } from \"@constants/Routes\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { completeTOTPRegistrationProcess } from \"@services/RegisterDevice\";\nimport { extractIdentityToken } from \"@utils/IdentityToken\";\n\nconst RegisterOneTimePassword = function () {\n const style = useStyles();\n const history = useHistory();\n const location = useLocation();\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 { createSuccessNotification, 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(() => {\n completeRegistrationProcess();\n }, [completeRegistrationProcess]);\n\n function SecretButton(text: string | undefined, action: string, icon: IconDefinition) {\n return (\n {\n navigator.clipboard.writeText(`${text}`);\n createSuccessNotification(`${action}`);\n }}\n >\n \n \n );\n }\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
\n {secretURL !== \"empty\" ? (\n \n ) : null}\n {secretBase32 ? SecretButton(secretBase32, \"OTP Secret copied to clipboard.\", faKey) : null}\n {secretURL !== \"empty\" ? SecretButton(secretURL, \"OTP URL copied to clipboard.\", faCopy) : null}\n
\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 padding: theme.spacing(),\n backgroundColor: \"white\",\n },\n fuzzy: {\n filter: \"blur(10px)\",\n },\n secret: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n width: \"256px\",\n },\n googleAuthenticator: {},\n googleAuthenticatorText: {\n fontSize: theme.typography.fontSize * 0.8,\n },\n googleAuthenticatorBadges: {},\n secretButtons: {\n width: \"128px\",\n },\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}));\n","import React from \"react\";\n\nimport classnames from \"classnames\";\n\nimport style from \"@components/FingerTouchIcon.module.css\";\n\nexport interface Props {\n size: number;\n\n animated?: boolean;\n strong?: boolean;\n}\n\nconst FingerTouchIcon = function (props: Props) {\n const shakingClass = props.animated ? style.shaking : undefined;\n const strong = props.strong ? style.strong : undefined;\n\n return (\n \n \n \n \n );\n};\n\nexport default FingerTouchIcon;\n","import React, { useState, useEffect, useCallback } from \"react\";\n\nimport { makeStyles, Typography, Button } from \"@material-ui/core\";\nimport { useHistory, useLocation } from \"react-router\";\nimport u2fApi from \"u2f-api\";\n\nimport FingerTouchIcon from \"@components/FingerTouchIcon\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { FirstFactorPath } from \"@services/Api\";\nimport { completeU2FRegistrationProcessStep1, completeU2FRegistrationProcessStep2 } from \"@services/RegisterDevice\";\nimport { extractIdentityToken } from \"@utils/IdentityToken\";\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 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(\n \"Failed to register your security key. The identity verification process might have timed out.\",\n );\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}));\n","import { useState, useCallback, DependencyList } from \"react\";\n\ntype PromisifiedFunction = (...args: any) => Promise;\n\nexport function useRemoteCall(\n fn: PromisifiedFunction,\n deps: DependencyList,\n): [Ret | undefined, () => void, 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(() => {\n (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 })();\n }, [setInProgress, setError, fnCallback]);\n\n return [data, triggerCallback, inProgress, error];\n}\n","import { ConsentPath } from \"@services/Api\";\nimport { Post, Get } from \"@services/Client\";\n\ninterface ConsentPostRequestBody {\n client_id: string;\n accept_or_reject: \"accept\" | \"reject\";\n}\n\ninterface ConsentPostResponseBody {\n redirect_uri: string;\n}\n\ninterface ConsentGetResponseBody {\n client_id: string;\n client_description: string;\n scopes: Scope[];\n audience: Audience[];\n}\n\ninterface Scope {\n name: string;\n description: string;\n}\n\ninterface Audience {\n name: string;\n description: string;\n}\n\nexport function getRequestedScopes() {\n return Get(ConsentPath);\n}\n\nexport function acceptConsent(clientID: string) {\n const body: ConsentPostRequestBody = { client_id: clientID, accept_or_reject: \"accept\" };\n return Post(ConsentPath, body);\n}\n\nexport function rejectConsent(clientID: string) {\n const body: ConsentPostRequestBody = { client_id: clientID, accept_or_reject: \"reject\" };\n return Post(ConsentPath, body);\n}\n","import { useCallback } from \"react\";\n\nexport function useRedirector() {\n return useCallback((url: string) => {\n window.location.href = url;\n }, []);\n}\n","import React from \"react\";\n\nimport { useTheme, Typography, Grid } from \"@material-ui/core\";\nimport ReactLoading from \"react-loading\";\n\nconst LoadingPage = function () {\n const theme = useTheme();\n return (\n \n \n \n Loading...\n \n \n );\n};\n\nexport default LoadingPage;\n","import React, { useEffect, Fragment, ReactNode } from \"react\";\n\nimport { Button, Grid, List, ListItem, ListItemIcon, ListItemText, Tooltip, makeStyles } from \"@material-ui/core\";\nimport { AccountBox, CheckBox, Contacts, Drafts, Group } from \"@material-ui/icons\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useRequestedScopes } from \"@hooks/Consent\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport { useRedirector } from \"@hooks/Redirector\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { acceptConsent, rejectConsent } from \"@services/Consent\";\nimport LoadingPage from \"@views/LoadingPage/LoadingPage\";\n\nexport interface Props {}\n\nfunction showListItemAvatar(id: string) {\n switch (id) {\n case \"openid\":\n return ;\n case \"profile\":\n return ;\n case \"groups\":\n return ;\n case \"email\":\n return ;\n default:\n return ;\n }\n}\n\nconst ConsentView = function (props: Props) {\n const classes = useStyles();\n const history = useHistory();\n const redirect = useRedirector();\n const { createErrorNotification, resetNotification } = useNotifications();\n const [resp, fetch, , err] = useRequestedScopes();\n\n useEffect(() => {\n if (err) {\n history.replace(\"/\");\n console.error(`Unable to display consent screen: ${err.message}`);\n }\n }, [history, resetNotification, createErrorNotification, err]);\n\n useEffect(() => {\n fetch();\n }, [fetch]);\n\n const handleAcceptConsent = async () => {\n // This case should not happen in theory because the buttons are disabled when response is undefined.\n if (!resp) {\n return;\n }\n const res = await acceptConsent(resp.client_id);\n if (res.redirect_uri) {\n redirect(res.redirect_uri);\n } else {\n throw new Error(\"Unable to redirect the user\");\n }\n };\n\n const handleRejectConsent = async () => {\n if (!resp) {\n return;\n }\n const res = await rejectConsent(resp.client_id);\n if (res.redirect_uri) {\n redirect(res.redirect_uri);\n } else {\n throw new Error(\"Unable to redirect the user\");\n }\n };\n\n return (\n \n \n \n \n
\n The application\n {` ${resp?.client_description} (${resp?.client_id}) `}\n is requesting the following permissions\n
\n
\n \n
\n \n {resp?.scopes.map((s) => (\n \n \n {showListItemAvatar(s.name)}\n \n \n \n ))}\n \n
\n
\n \n \n \n \n Accept\n \n \n \n \n Deny\n \n \n \n \n
\n
\n
\n );\n};\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n display: \"block\",\n justifyContent: \"center\",\n },\n scopesListContainer: {\n textAlign: \"center\",\n },\n scopesList: {\n display: \"inline-block\",\n backgroundColor: theme.palette.background.paper,\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n clientID: {\n fontWeight: \"bold\",\n },\n button: {\n marginLeft: theme.spacing(),\n marginRight: theme.spacing(),\n width: \"100%\",\n },\n bulletIcon: {\n display: \"inline-block\",\n },\n permissionsContainer: {\n border: \"1px solid #dedede\",\n margin: theme.spacing(4),\n },\n listItem: {\n textAlign: \"center\",\n marginRight: theme.spacing(2),\n },\n}));\n\nexport default ConsentView;\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}\n","export enum SecondFactorMethod {\n TOTP = 1,\n U2F = 2,\n MobilePush = 3,\n}\n","import { StatePath } from \"@services/Api\";\nimport { Get } from \"@services/Client\";\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}\n","import { useRemoteCall } from \"@hooks/RemoteCall\";\nimport { getRequestedScopes } from \"@services/Consent\";\n\nexport function useRequestedScopes() {\n return useRemoteCall(getRequestedScopes, []);\n}\n","import { SecondFactorMethod } from \"@models/Methods\";\nimport { UserInfo } from \"@models/UserInfo\";\nimport { UserInfoPath, UserInfo2FAMethodPath } from \"@services/Api\";\nimport { Get, PostWithOptionalResponse } from \"@services/Client\";\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, { method: toString(method) } as MethodPreferencePayload);\n}\n","import { Configuration } from \"@models/Configuration\";\nimport { ConfigurationPath } from \"@services/Api\";\nimport { Get } from \"@services/Client\";\nimport { toEnum, Method2FA } from \"@services/UserPreferences\";\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}\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 ? (queryParams[\"rd\"] as string) : undefined;\n}\n","import queryString from \"query-string\";\nimport { useLocation } from \"react-router\";\n\nexport function useRequestMethod() {\n const location = useLocation();\n const queryParams = queryString.parse(location.search);\n return queryParams && \"rm\" in queryParams ? (queryParams[\"rm\"] as string) : undefined;\n}\n","import { ChecksSafeRedirectionPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\n\ninterface SafeRedirectionResponse {\n ok: boolean;\n}\n\nexport async function checkSafeRedirection(uri: string) {\n return PostWithOptionalResponse(ChecksSafeRedirectionPath, { uri });\n}\n","import React from \"react\";\n\nimport { faCheckCircle } from \"@fortawesome/free-regular-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst SuccessIcon = function () {\n return ;\n};\n\nexport default SuccessIcon;\n","import React from \"react\";\n\nimport { Typography, makeStyles } from \"@material-ui/core\";\n\nimport SuccessIcon from \"@components/SuccessIcon\";\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}));\n","import React from \"react\";\n\nimport { Grid, makeStyles, Button } from \"@material-ui/core\";\nimport { useHistory } from \"react-router\";\n\nimport { LogoutRoute as SignOutRoute } from \"@constants/Routes\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport Authenticated from \"@views/LoginPortal/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 from \"react\";\n\nimport { makeStyles } from \"@material-ui/core\";\nimport TextField, { TextFieldProps } from \"@material-ui/core/TextField\";\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}));\n","import { FirstFactorPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\nimport { SignInResponse } from \"@services/SignIn\";\n\ninterface PostFirstFactorBody {\n username: string;\n password: string;\n keepMeLoggedIn: boolean;\n targetURL?: string;\n requestMethod?: string;\n}\n\nexport async function postFirstFactor(\n username: string,\n password: string,\n rememberMe: boolean,\n targetURL?: string,\n requestMethod?: string,\n) {\n const data: PostFirstFactorBody = {\n username,\n password,\n keepMeLoggedIn: rememberMe,\n };\n\n if (targetURL) {\n data.targetURL = targetURL;\n }\n\n if (requestMethod) {\n data.requestMethod = requestMethod;\n }\n\n const res = await PostWithOptionalResponse(FirstFactorPath, data);\n return res ? res : ({} as SignInResponse);\n}\n","import React, { MutableRefObject, useEffect, useRef, useState } from \"react\";\n\nimport { makeStyles, Grid, Button, FormControlLabel, Checkbox, Link } from \"@material-ui/core\";\nimport classnames from \"classnames\";\nimport { useHistory } from \"react-router\";\n\nimport FixedTextField from \"@components/FixedTextField\";\nimport { ResetPasswordStep1Route } from \"@constants/Routes\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { useRequestMethod } from \"@hooks/RequestMethod\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { postFirstFactor } from \"@services/FirstFactor\";\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 const requestMethod = useRequestMethod();\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, requestMethod);\n props.onAuthenticationSuccess(res ? res.redirect : undefined);\n } catch (err) {\n console.error(err);\n createErrorNotification(\"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 autoComplete=\"username\"\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 \n setPassword(v.target.value)}\n onFocus={() => setPasswordError(false)}\n type=\"password\"\n autoComplete=\"current-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 \n {props.rememberMe ? (\n \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 }\n className={style.rememberMe}\n label=\"Remember me\"\n />\n \n ) : null}\n \n \n Sign in\n \n \n {props.resetPassword ? (\n \n \n Reset password?\n \n \n ) : null}\n \n \n );\n};\n\nexport default FirstFactorForm;\n\nconst useStyles = makeStyles((theme) => ({\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}));\n","import React from \"react\";\n\nimport style from \"@components/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(\n props.animated ? style.wiggle : \"\",\n wiggleMilliseconds,\n idleMilliseconds,\n startMilliseconds,\n );\n\n return (\n \n \n \n \n \n \n \n\n \n \n \n \n \n );\n};\n\nexport default PushNotificationIcon;\n","import { useState, useEffect } from \"react\";\n\nexport function useIntermittentClass(\n classname: string,\n activeMilliseconds: number,\n inactiveMillisecond: number,\n startMillisecond?: number,\n) {\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}\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;\n","import React, { useState, useEffect } from \"react\";\n\nimport PieChartIcon from \"@components/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;\n","import React, { ReactNode } from \"react\";\n\nimport {\n Dialog,\n Grid,\n makeStyles,\n DialogContent,\n Button,\n DialogActions,\n Typography,\n useTheme,\n} from \"@material-ui/core\";\n\nimport FingerTouchIcon from \"@components/FingerTouchIcon\";\nimport PushNotificationIcon from \"@components/PushNotificationIcon\";\nimport TimerIcon from \"@components/TimerIcon\";\nimport { SecondFactorMethod } from \"@models/Methods\";\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 );\n\n return (\n \n \n \n {props.methods.has(SecondFactorMethod.TOTP) ? (\n props.onClick(SecondFactorMethod.TOTP)}\n />\n ) : null}\n {props.methods.has(SecondFactorMethod.U2F) && props.u2fSupported ? (\n }\n onClick={() => props.onClick(SecondFactorMethod.U2F)}\n />\n ) : null}\n {props.methods.has(SecondFactorMethod.MobilePush) ? (\n }\n onClick={() => props.onClick(SecondFactorMethod.MobilePush)}\n />\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
{props.icon}
\n
\n {props.method}\n
\n \n
\n );\n}\n","import { CompleteTOTPSignInPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\nimport { SignInResponse } from \"@services/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}\n","import React from \"react\";\n\nimport { faInfoCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport interface Props {}\n\nconst InformationIcon = function (props: Props) {\n return ;\n};\n\nexport default InformationIcon;\n","import React, { ReactNode, Fragment } from \"react\";\n\nimport { makeStyles, Typography, Link, useTheme } from \"@material-ui/core\";\nimport classnames from \"classnames\";\n\nimport InformationIcon from \"@components/InformationIcon\";\nimport Authenticated from \"@views/LoginPortal/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 registered: boolean;\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 const registerMessage = props.registered ? \"Lost your device?\" : \"Not registered yet?\";\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 = {props.children};\n stateClass = \"state-method\";\n break;\n }\n\n return (\n
\n {props.title}\n
\n
{container}
\n
\n {props.onRegisterClick ? (\n \n {registerMessage}\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 \n
\n \n Register your first device by clicking on the link below\n \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}\n","import React, { useState, useEffect, useCallback } from \"react\";\n\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { completeTOTPSignIn } from \"@services/OneTimePassword\";\nimport { AuthenticationLevel } from \"@services/State\";\nimport MethodContainer, { State as MethodContainerState } from \"@views/LoginPortal/SecondFactor/MethodContainer\";\nimport OTPDial from \"@views/LoginPortal/SecondFactor/OTPDial\";\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(\n props.authenticationLevel === AuthenticationLevel.TwoFactor ? State.Success : State.Idle,\n );\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.registered || 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 }, [\n passcode,\n onSignInErrorCallback,\n onSignInSuccessCallback,\n redirectionURL,\n props.authenticationLevel,\n props.registered,\n ]);\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(() => {\n signInFunc();\n }, [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;\n","import React, { ReactNode } from \"react\";\n\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
{props.icon}
\n
\n
{props.context}
\n
\n );\n};\n\nexport default IconWithContext;\n","import React, { Fragment } from \"react\";\n\nimport { makeStyles } from \"@material-ui/core\";\nimport classnames from \"classnames\";\nimport OtpInput from \"react-otp-input\";\n\nimport SuccessIcon from \"@components/SuccessIcon\";\nimport TimerIcon from \"@components/TimerIcon\";\nimport IconWithContext from \"@views/LoginPortal/SecondFactor/IconWithContext\";\nimport { State } from \"@views/LoginPortal/SecondFactor/OneTimePasswordMethod\";\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 } context={dial} />;\n};\n\nexport default OTPDial;\n\nconst useStyles = makeStyles((theme) => ({\n timeProgress: {},\n register: {\n marginTop: theme.spacing(),\n },\n otpInput: {\n display: \"inline-block\",\n marginTop: theme.spacing(2),\n },\n otpDigitInput: {\n boxSizing: \"content-box\",\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 ? (\n \n ) : null}\n {props.state === State.Success ? : null}\n \n );\n}\n","import React, { useEffect, useCallback, useState, ReactNode } from \"react\";\n\nimport { Button, makeStyles } from \"@material-ui/core\";\n\nimport FailureIcon from \"@components/FailureIcon\";\nimport PushNotificationIcon from \"@components/PushNotificationIcon\";\nimport SuccessIcon from \"@components/SuccessIcon\";\nimport { useIsMountedRef } from \"@hooks/Mounted\";\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { completePushNotificationSignIn } from \"@services/PushNotification\";\nimport { AuthenticationLevel } from \"@services/State\";\nimport MethodContainer, { State as MethodContainerState } from \"@views/LoginPortal/SecondFactor/MethodContainer\";\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(() => {\n signInFunc();\n }, [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
{icon}
\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}));\n","import React from \"react\";\n\nimport { faTimesCircle } from \"@fortawesome/free-regular-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport interface Props {}\n\nconst FailureIcon = function (props: Props) {\n return ;\n};\n\nexport default FailureIcon;\n","import { useRef, useEffect } from \"react\";\n\nexport function useIsMountedRef() {\n const isMountedRef = useRef(false);\n useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n });\n return isMountedRef;\n}\n","import { CompletePushNotificationSignInPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\nimport { SignInResponse } from \"@services/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}\n","import React, { useCallback, useEffect, useState, Fragment } from \"react\";\n\nimport { makeStyles, Button, useTheme } from \"@material-ui/core\";\nimport { CSSProperties } from \"@material-ui/styles\";\nimport u2fApi from \"u2f-api\";\n\nimport FailureIcon from \"@components/FailureIcon\";\nimport FingerTouchIcon from \"@components/FingerTouchIcon\";\nimport LinearProgressBar from \"@components/LinearProgressBar\";\nimport { useIsMountedRef } from \"@hooks/Mounted\";\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { useTimer } from \"@hooks/Timer\";\nimport { initiateU2FSignin, completeU2FSignin } from \"@services/SecurityKey\";\nimport { AuthenticationLevel } from \"@services/State\";\nimport IconWithContext from \"@views/LoginPortal/SecondFactor/IconWithContext\";\nimport MethodContainer, { State as MethodContainerState } from \"@views/LoginPortal/SecondFactor/MethodContainer\";\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 }, [\n onSignInSuccessCallback,\n onSignInErrorCallback,\n redirectionURL,\n mounted,\n triggerTimer,\n props.authenticationLevel,\n props.registered,\n ]);\n\n useEffect(() => {\n doInitiateSignIn();\n }, [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 }\n context={}\n className={state === State.WaitTouch ? undefined : \"hidden\"}\n />\n );\n\n const failure = (\n }\n context={\n \n }\n className={state === State.Failure ? undefined : \"hidden\"}\n />\n );\n\n return (\n \n {touch}\n {failure}\n \n );\n}\n","import React from \"react\";\n\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;\n","import u2fApi from \"u2f-api\";\n\nimport { InitiateU2FSignInPath, CompleteU2FSignInPath } from \"@services/Api\";\nimport { Post, PostWithOptionalResponse } from \"@services/Client\";\nimport { SignInResponse } from \"@services/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}\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 [percent, trigger, clear];\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { Grid, makeStyles, Button } from \"@material-ui/core\";\nimport { useHistory, Switch, Route, Redirect } from \"react-router\";\nimport u2fApi from \"u2f-api\";\n\nimport {\n LogoutRoute as SignOutRoute,\n SecondFactorTOTPRoute,\n SecondFactorPushRoute,\n SecondFactorU2FRoute,\n SecondFactorRoute,\n} from \"@constants/Routes\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { Configuration } from \"@models/Configuration\";\nimport { SecondFactorMethod } from \"@models/Methods\";\nimport { UserInfo } from \"@models/UserInfo\";\nimport { initiateTOTPRegistrationProcess, initiateU2FRegistrationProcess } from \"@services/RegisterDevice\";\nimport { AuthenticationLevel } from \"@services/State\";\nimport { setPreferred2FAMethod } from \"@services/UserPreferences\";\nimport MethodSelectionDialog from \"@views/LoginPortal/SecondFactor/MethodSelectionDialog\";\nimport OneTimePasswordMethod from \"@views/LoginPortal/SecondFactor/OneTimePasswordMethod\";\nimport PushNotificationMethod from \"@views/LoginPortal/SecondFactor/PushNotificationMethod\";\nimport SecurityKeyMethod from \"@views/LoginPortal/SecondFactor/SecurityKeyMethod\";\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 );\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 \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess}\n />\n \n \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess}\n />\n \n \n createErrorNotification(err.message)}\n onSignInSuccess={props.onAuthenticationSuccess}\n />\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 React, { Fragment, ReactNode, useCallback, useEffect, useState } from \"react\";\n\nimport { Redirect, Route, Switch, useHistory, useLocation } from \"react-router\";\n\nimport {\n AuthenticatedRoute,\n FirstFactorRoute,\n SecondFactorPushRoute,\n SecondFactorRoute,\n SecondFactorTOTPRoute,\n SecondFactorU2FRoute,\n} from \"@constants/Routes\";\nimport { useConfiguration } from \"@hooks/Configuration\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { useRedirector } from \"@hooks/Redirector\";\nimport { useRequestMethod } from \"@hooks/RequestMethod\";\nimport { useAutheliaState } from \"@hooks/State\";\nimport { useUserPreferences as userUserInfo } from \"@hooks/UserInfo\";\nimport { SecondFactorMethod } from \"@models/Methods\";\nimport { checkSafeRedirection } from \"@services/SafeRedirection\";\nimport { AuthenticationLevel } from \"@services/State\";\nimport LoadingPage from \"@views/LoadingPage/LoadingPage\";\nimport AuthenticatedView from \"@views/LoginPortal/AuthenticatedView/AuthenticatedView\";\nimport FirstFactorForm from \"@views/LoginPortal/FirstFactor/FirstFactorForm\";\nimport SecondFactorForm from \"@views/LoginPortal/SecondFactor/SecondFactorForm\";\n\nexport interface Props {\n rememberMe: boolean;\n resetPassword: boolean;\n}\n\nconst RedirectionErrorMessage =\n \"Redirection was determined to be unsafe and aborted. Ensure the redirection URL is correct.\";\n\nconst LoginPortal = function (props: Props) {\n const history = useHistory();\n const location = useLocation();\n const redirectionURL = useRedirectionURL();\n const requestMethod = useRequestMethod();\n const { createErrorNotification } = useNotifications();\n const [firstFactorDisabled, setFirstFactorDisabled] = useState(true);\n const redirector = useRedirector();\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(() => {\n fetchState();\n }, [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 (async function () {\n if (!state) {\n return;\n }\n\n if (\n redirectionURL &&\n ((configuration &&\n !configuration.second_factor_enabled &&\n state.authentication_level >= AuthenticationLevel.OneFactor) ||\n state.authentication_level === AuthenticationLevel.TwoFactor)\n ) {\n try {\n const res = await checkSafeRedirection(redirectionURL);\n if (res && res.ok) {\n redirector(redirectionURL);\n } else {\n createErrorNotification(RedirectionErrorMessage);\n }\n } catch (err) {\n createErrorNotification(RedirectionErrorMessage);\n }\n return;\n }\n\n const redirectionSuffix = redirectionURL\n ? `?rd=${encodeURIComponent(redirectionURL)}${requestMethod ? `&rm=${requestMethod}` : \"\"}`\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 }, [\n state,\n redirectionURL,\n requestMethod,\n redirect,\n userInfo,\n setFirstFactorDisabled,\n configuration,\n createErrorNotification,\n redirector,\n ]);\n\n const handleAuthSuccess = async (redirectionURL: string | undefined) => {\n if (redirectionURL) {\n // Do an external redirection pushed by the server.\n redirector(redirectionURL);\n } else {\n // Refresh state\n fetchState();\n }\n };\n\n const firstFactorReady =\n 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 \n {state && userInfo && configuration ? (\n fetchUserInfo()}\n onAuthenticationSuccess={handleAuthSuccess}\n />\n ) : null}\n \n \n {userInfo ? : null}\n \n {/* By default we route to first factor page */}\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}\n","import { useRemoteCall } from \"@hooks/RemoteCall\";\nimport { getState } from \"@services/State\";\n\nexport function useAutheliaState() {\n return useRemoteCall(getState, []);\n}\n","import { useRemoteCall } from \"@hooks/RemoteCall\";\nimport { getUserPreferences } from \"@services/UserPreferences\";\n\nexport function useUserPreferences() {\n return useRemoteCall(getUserPreferences, []);\n}\n","import { useRemoteCall } from \"@hooks/RemoteCall\";\nimport { getConfiguration } from \"@services/Configuration\";\n\nexport function useConfiguration() {\n return useRemoteCall(getConfiguration, []);\n}\n","import { LogoutPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\n\nexport type SignOutResponse = { safeTargetURL: boolean } | undefined;\n\nexport type SignOutBody = {\n targetURL?: string;\n};\n\nexport async function signOut(targetURL: string | undefined): Promise {\n const body: SignOutBody = {};\n if (targetURL) {\n body.targetURL = targetURL;\n }\n\n return PostWithOptionalResponse(LogoutPath, body);\n}\n","import React, { useEffect, useCallback, useState } from \"react\";\n\nimport { Typography, makeStyles } from \"@material-ui/core\";\nimport { Redirect } from \"react-router\";\n\nimport { FirstFactorRoute } from \"@constants/Routes\";\nimport { useIsMountedRef } from \"@hooks/Mounted\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport { useRedirectionURL } from \"@hooks/RedirectionURL\";\nimport { useRedirector } from \"@hooks/Redirector\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { signOut } from \"@services/SignOut\";\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 redirector = useRedirector();\n const [timedOut, setTimedOut] = useState(false);\n const [safeRedirect, setSafeRedirect] = useState(false);\n\n const doSignOut = useCallback(async () => {\n try {\n const res = await signOut(redirectionURL);\n if (res !== undefined && res.safeTargetURL) {\n setSafeRedirect(true);\n }\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, redirectionURL, setSafeRedirect, setTimedOut, mounted]);\n\n useEffect(() => {\n doSignOut();\n }, [doSignOut]);\n\n if (timedOut) {\n if (redirectionURL && safeRedirect) {\n redirector(redirectionURL);\n } else {\n return ;\n }\n }\n\n return (\n \n You're being signed out and redirected...\n \n );\n};\n\nexport default SignOut;\n\nconst useStyles = makeStyles((theme) => ({\n typo: {\n padding: theme.spacing(),\n },\n}));\n","import { InitiateResetPasswordPath, CompleteResetPasswordPath, ResetPasswordPath } from \"@services/Api\";\nimport { PostWithOptionalResponse } from \"@services/Client\";\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}\n","import React, { useState } from \"react\";\n\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\nimport { useHistory } from \"react-router\";\n\nimport FixedTextField from \"@components/FixedTextField\";\nimport { FirstFactorRoute } from \"@constants/Routes\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { initiateResetPasswordProcess } from \"@services/ResetPassword\";\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 \n \n \n \n \n Cancel\n \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}));\n","import React, { useState, useCallback, useEffect } from \"react\";\n\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\nimport classnames from \"classnames\";\nimport { useHistory, useLocation } from \"react-router\";\n\nimport FixedTextField from \"@components/FixedTextField\";\nimport { FirstFactorRoute } from \"@constants/Routes\";\nimport { useNotifications } from \"@hooks/NotificationsContext\";\nimport LoginLayout from \"@layouts/LoginLayout\";\nimport { completeResetPasswordProcess, resetPassword } from \"@services/ResetPassword\";\nimport { extractIdentityToken } from \"@utils/IdentityToken\";\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(\n \"There was an issue completing the process. The verification token might have expired.\",\n );\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 if (err.message.includes(\"0000052D.\")) {\n createErrorNotification(\"Your supplied password does not meet the password policy requirements.\");\n } else {\n createErrorNotification(\"There was an issue resetting the password.\");\n }\n }\n };\n\n const handleResetClick = () => doResetPassword();\n\n const handleCancelClick = () => history.push(FirstFactorRoute);\n\n return (\n \n \n \n setPassword1(e.target.value)}\n error={errorPassword1}\n className={classnames(style.fullWidth)}\n autoComplete=\"new-password\"\n />\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 autoComplete=\"new-password\"\n />\n \n \n \n Reset\n \n \n \n \n Cancel\n \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}));\n","import React, { useState, useEffect } from \"react\";\n\nimport { config as faConfig } from \"@fortawesome/fontawesome-svg-core\";\nimport { CssBaseline, ThemeProvider } from \"@material-ui/core\";\nimport { BrowserRouter as Router, Route, Switch, Redirect } from \"react-router-dom\";\n\nimport NotificationBar from \"@components/NotificationBar\";\nimport {\n FirstFactorRoute,\n ResetPasswordStep2Route,\n ResetPasswordStep1Route,\n RegisterSecurityKeyRoute,\n RegisterOneTimePasswordRoute,\n LogoutRoute,\n ConsentRoute,\n} from \"@constants/Routes\";\nimport NotificationsContext from \"@hooks/NotificationsContext\";\nimport { Notification } from \"@models/Notifications\";\nimport * as themes from \"@themes/index\";\nimport { getBasePath } from \"@utils/BasePath\";\nimport { getRememberMe, getResetPassword, getTheme } from \"@utils/Configuration\";\nimport RegisterOneTimePassword from \"@views/DeviceRegistration/RegisterOneTimePassword\";\nimport RegisterSecurityKey from \"@views/DeviceRegistration/RegisterSecurityKey\";\nimport ConsentView from \"@views/LoginPortal/ConsentView/ConsentView\";\nimport LoginPortal from \"@views/LoginPortal/LoginPortal\";\nimport SignOut from \"@views/LoginPortal/SignOut/SignOut\";\nimport ResetPasswordStep1 from \"@views/ResetPassword/ResetPasswordStep1\";\nimport ResetPasswordStep2 from \"@views/ResetPassword/ResetPasswordStep2\";\n\nimport \"@fortawesome/fontawesome-svg-core/styles.css\";\n\nfaConfig.autoAddCss = false;\n\nfunction Theme() {\n switch (getTheme()) {\n case \"dark\":\n return themes.Dark;\n case \"grey\":\n return themes.Grey;\n case \"auto\":\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? themes.Dark : themes.Light;\n default:\n return themes.Light;\n }\n}\n\nconst App: React.FC = () => {\n const [notification, setNotification] = useState(null as Notification | null);\n const [theme, setTheme] = useState(Theme());\n useEffect(() => {\n if (getTheme() === \"auto\") {\n const query = window.matchMedia(\"(prefers-color-scheme: dark)\");\n // MediaQueryLists does not inherit from EventTarget in Internet Explorer\n if (query.addEventListener) {\n query.addEventListener(\"change\", (e) => {\n setTheme(e.matches ? themes.Dark : themes.Light);\n });\n }\n }\n }, []);\n return (\n \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 \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(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\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((process as { env: { [key: string]: string } }).env.PUBLIC_URL, window.location.href);\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 (response.status === 404 || (contentType != null && contentType.indexOf(\"javascript\") === -1)) {\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(\"No internet connection found. App is running in offline mode.\");\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\";\n\nimport ReactDOM from \"react-dom\";\n\nimport \"@utils/AssetPath\";\nimport \"@root/index.css\";\nimport App from \"@root/App\";\nimport * as serviceWorker from \"@root/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\"};"],"sourceRoot":""}