summaryrefslogtreecommitdiff
path: root/web/src/layouts/SettingsLayout.tsx
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2023-10-13 06:01:55 +1100
committerJames Elliott <james-d-elliott@users.noreply.github.com>2024-03-04 20:28:24 +1100
commite618cf341627a89b5fec594090cf765c86aafaad (patch)
treef8091502dbb3d0da8d6ea960f8cd029b2b151208 /web/src/layouts/SettingsLayout.tsx
parent87d2a3419d6f29db900bc1aeb4cf5d7769a15ce3 (diff)
feat(web): one-time codes for identity verification
This replaces the JWT method for Identity Verification for most elements with a One-Time Code which has a controllable lifetime. These codes elevate the session for a duration, are less likely to be accidentally clicked, can be revoked, and generally a better experience for users. Users will be able to copy the codes directly from the email or manually type them. This improves the process as the user is very unlikely to input the code into the wrong window, and can't open it in the wrong browser. In addition the process prevents accidental clicking from causing issues. Closes #3801 Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'web/src/layouts/SettingsLayout.tsx')
-rw-r--r--web/src/layouts/SettingsLayout.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/web/src/layouts/SettingsLayout.tsx b/web/src/layouts/SettingsLayout.tsx
index 2f9fbea67..cae19d182 100644
--- a/web/src/layouts/SettingsLayout.tsx
+++ b/web/src/layouts/SettingsLayout.tsx
@@ -1,6 +1,6 @@
import React, { ReactNode, SyntheticEvent, useCallback, useEffect, useState } from "react";
-import { Close, Dashboard } from "@mui/icons-material";
+import { Close, Dashboard, ScienceOutlined } from "@mui/icons-material";
import MenuIcon from "@mui/icons-material/Menu";
import SystemSecurityUpdateGoodIcon from "@mui/icons-material/SystemSecurityUpdateGood";
import {
@@ -19,7 +19,12 @@ import {
import IconButton from "@mui/material/IconButton";
import { useTranslation } from "react-i18next";
-import { IndexRoute, SettingsRoute, SettingsTwoFactorAuthenticationSubRoute } from "@constants/Routes";
+import {
+ IndexRoute,
+ SettingsRoute,
+ SettingsTestSubRoute,
+ SettingsTwoFactorAuthenticationSubRoute,
+} from "@constants/Routes";
import { useRouterNavigate } from "@hooks/RouterNavigate";
export interface Props {
@@ -145,6 +150,12 @@ const navItems: NavItem[] = [
pathname: `${SettingsRoute}${SettingsTwoFactorAuthenticationSubRoute}`,
icon: <SystemSecurityUpdateGoodIcon color={"primary"} />,
},
+ {
+ keyname: "test",
+ text: "Test",
+ pathname: `${SettingsRoute}${SettingsTestSubRoute}`,
+ icon: <ScienceOutlined color={"primary"} />,
+ },
{ keyname: "close", text: "Close", pathname: IndexRoute, icon: <Close color={"error"} /> },
];