strapi-identity 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/admin/{AdminReset-DOmsyqwQ.mjs → AdminReset-DjVX7phX.mjs} +1 -1
  2. package/dist/admin/{AdminReset-BiWQDTRv.js → AdminReset-DsKz040S.js} +1 -1
  3. package/dist/admin/{ProfileToggle-BUqs_hxZ.js → ProfileToggle-4u6WWddz.js} +1 -1
  4. package/dist/admin/{ProfileToggle-k0d-caPC.mjs → ProfileToggle-B1UK1opI.mjs} +1 -1
  5. package/dist/admin/{SettingsPage-Dm_llkYv.mjs → SettingsPage-CcHTu8-f.mjs} +1 -1
  6. package/dist/admin/{SettingsPage-DVVkN1xw.js → SettingsPage-DZDW9kNI.js} +1 -1
  7. package/dist/admin/{index-DpIJdETG.mjs → index-Bm3H4z3W.mjs} +41 -20
  8. package/dist/admin/{index-B9P8S4CX.js → index-Ce4QOU6Y.js} +41 -20
  9. package/dist/admin/index.js +1 -1
  10. package/dist/admin/index.mjs +1 -1
  11. package/dist/admin/src/components/ConfirmModal/ConfirmModal.d.ts +9 -0
  12. package/dist/admin/src/components/ConfirmModal/index.d.ts +1 -0
  13. package/dist/admin/src/components/EmailOTPModal/EmailOTPModal.d.ts +8 -0
  14. package/dist/admin/src/components/Initializer.d.ts +5 -0
  15. package/dist/admin/src/components/InputOTP.d.ts +11 -0
  16. package/dist/admin/src/components/RemoveModal/RemoveModal.d.ts +6 -0
  17. package/dist/admin/src/components/RemoveModal/index.d.ts +1 -0
  18. package/dist/admin/src/components/WarningAlert/WarningAlert.d.ts +10 -0
  19. package/dist/admin/src/components/WarningAlert/index.d.ts +1 -0
  20. package/dist/admin/src/injection/AdminReset.d.ts +4 -0
  21. package/dist/admin/src/injection/ProfileToggle.d.ts +2 -0
  22. package/dist/admin/src/pages/EnforcedPage.d.ts +13 -0
  23. package/dist/admin/src/pluginId.d.ts +1 -0
  24. package/dist/admin/src/public/VerifyPage.d.ts +12 -0
  25. package/dist/admin/src/settings/SettingsPage.d.ts +1 -0
  26. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  27. package/dist/admin/src/utils/tokenHelpers.d.ts +12 -0
  28. package/dist/server/index.js +72 -46
  29. package/dist/server/index.mjs +72 -46
  30. package/dist/server/src/bootstrap.d.ts +3 -0
  31. package/dist/server/src/config/index.d.ts +3 -0
  32. package/dist/server/src/content-types/config/index.d.ts +72 -0
  33. package/dist/server/src/content-types/config/schema.json.d.ts +72 -0
  34. package/dist/server/src/content-types/email-otp/index.d.ts +48 -0
  35. package/dist/server/src/content-types/email-otp/schema.json.d.ts +48 -0
  36. package/dist/server/src/content-types/index.d.ts +3 -0
  37. package/dist/server/src/content-types/mfa/index.d.ts +55 -0
  38. package/dist/server/src/content-types/mfa/schema.json.d.ts +55 -0
  39. package/dist/server/src/content-types/temp-mfa/index.d.ts +35 -0
  40. package/dist/server/src/content-types/temp-mfa/schema.json.d.ts +35 -0
  41. package/dist/server/src/controllers/admin.d.ts +4 -0
  42. package/dist/server/src/controllers/config.d.ts +4 -0
  43. package/dist/server/src/controllers/controller.d.ts +8 -0
  44. package/dist/server/src/controllers/index.d.ts +3 -0
  45. package/dist/server/src/destroy.d.ts +3 -0
  46. package/dist/server/src/middlewares/index.d.ts +3 -0
  47. package/dist/server/src/policies/has-mfa.d.ts +3 -0
  48. package/dist/server/src/policies/index.d.ts +3 -0
  49. package/dist/server/src/register.d.ts +3 -0
  50. package/dist/server/src/routes/admin/admin.json.d.ts +35 -0
  51. package/dist/server/src/routes/admin/config.json.d.ts +50 -0
  52. package/dist/server/src/routes/admin/index.d.ts +3 -0
  53. package/dist/server/src/routes/admin/mfa.json.d.ts +94 -0
  54. package/dist/server/src/routes/index.d.ts +3 -0
  55. package/dist/server/src/services/admin.d.ts +11 -0
  56. package/dist/server/src/services/config.d.ts +57 -0
  57. package/dist/server/src/services/email.d.ts +8 -0
  58. package/dist/server/src/services/index.d.ts +3 -0
  59. package/dist/server/src/services/mfa.d.ts +82 -0
  60. package/package.json +6 -5
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { W as WarningAlert } from "./WarningAlert-VU011LVF.mjs";
4
4
  import { Box, Flex, Typography, Grid, Button } from "@strapi/design-system";
5
- import { g as getToken, a as getTranslation } from "./index-DpIJdETG.mjs";
5
+ import { g as getToken, a as getTranslation } from "./index-Bm3H4z3W.mjs";
6
6
  import { useIntl } from "react-intl";
7
7
  const AdminReset = ({ id }) => {
8
8
  const { formatMessage } = useIntl();
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const WarningAlert = require("./WarningAlert-DFE5euMk.js");
6
6
  const designSystem = require("@strapi/design-system");
7
- const index = require("./index-B9P8S4CX.js");
7
+ const index = require("./index-Ce4QOU6Y.js");
8
8
  const reactIntl = require("react-intl");
9
9
  const AdminReset = ({ id }) => {
10
10
  const { formatMessage } = reactIntl.useIntl();
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const designSystem = require("@strapi/design-system");
6
- const index = require("./index-B9P8S4CX.js");
6
+ const index = require("./index-Ce4QOU6Y.js");
7
7
  const reactIntl = require("react-intl");
8
8
  function RemoveModal({ open, onOpenChange, onSubmit }) {
9
9
  const { formatMessage } = reactIntl.useIntl();
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { Modal, Flex, Typography, TextInput, Button, Box, Grid, Field, Toggle } from "@strapi/design-system";
4
- import { a as getTranslation, I as InputOTP, b as InputOTPGroup, c as InputOTPSlot, d as InputOTPSeparator, g as getToken, C as ConfirmModal, E as EmailOTPModal } from "./index-DpIJdETG.mjs";
4
+ import { a as getTranslation, I as InputOTP, b as InputOTPGroup, c as InputOTPSlot, d as InputOTPSeparator, g as getToken, C as ConfirmModal, E as EmailOTPModal } from "./index-Bm3H4z3W.mjs";
5
5
  import { useIntl } from "react-intl";
6
6
  function RemoveModal({ open, onOpenChange, onSubmit }) {
7
7
  const { formatMessage } = useIntl();
@@ -4,7 +4,7 @@ import { W as WarningAlert } from "./WarningAlert-VU011LVF.mjs";
4
4
  import { useNotification, Page, Layouts } from "@strapi/strapi/admin";
5
5
  import { Button, Flex, Typography, Grid, Field, Toggle, TextInput, Textarea } from "@strapi/design-system";
6
6
  import { Check } from "@strapi/icons";
7
- import { g as getToken, a as getTranslation } from "./index-DpIJdETG.mjs";
7
+ import { g as getToken, a as getTranslation } from "./index-Bm3H4z3W.mjs";
8
8
  import { useIntl } from "react-intl";
9
9
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
10
10
  var lodash$1 = { exports: {} };
@@ -6,7 +6,7 @@ const WarningAlert = require("./WarningAlert-DFE5euMk.js");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
- const index = require("./index-B9P8S4CX.js");
9
+ const index = require("./index-Ce4QOU6Y.js");
10
10
  const reactIntl = require("react-intl");
11
11
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
12
12
  var lodash$1 = { exports: {} };
@@ -1350,7 +1350,8 @@ const VerifyPage = ({ fallbackIcon }) => {
1350
1350
  `${response.status} ${response.statusText}: ${data.error || "Unknown error"}`
1351
1351
  );
1352
1352
  }
1353
- const target = new URLSearchParams(window.location.search).get("redirectTo") || "/admin";
1353
+ const rawTarget = new URLSearchParams(window.location.search).get("redirectTo") || "/admin";
1354
+ const target = /^\/[^/]/.test(rawTarget) ? rawTarget : "/admin";
1354
1355
  window.location.replace(target);
1355
1356
  } catch (error2) {
1356
1357
  setError(
@@ -1363,20 +1364,26 @@ const VerifyPage = ({ fallbackIcon }) => {
1363
1364
  }
1364
1365
  };
1365
1366
  useEffect(() => {
1366
- const mfaToken = document.cookie.split("; ").reduce((acc, cookie) => {
1367
- const [name, value] = cookie.split("=");
1368
- return name === "strapi_admin_mfa" ? value.trim() : acc;
1369
- }, null);
1370
- if (auth?.token || !mfaToken) {
1367
+ if (auth?.token) {
1371
1368
  window.location.replace("/admin");
1372
1369
  return;
1373
1370
  }
1374
- try {
1375
- const payloadBase64 = mfaToken.split(".")[1];
1376
- const decoded = JSON.parse(atob(payloadBase64));
1377
- setMfaType(decoded.mfaType || null);
1378
- } catch {
1379
- }
1371
+ const ac = new AbortController();
1372
+ (async () => {
1373
+ try {
1374
+ const response = await fetch("/strapi-identity/verify/info", { signal: ac.signal });
1375
+ if (!response.ok) {
1376
+ window.location.replace("/admin");
1377
+ return;
1378
+ }
1379
+ const data = await response.json();
1380
+ setMfaType(data.data?.mfaType || null);
1381
+ } catch (error2) {
1382
+ if (error2 instanceof DOMException && error2.name === "AbortError") return;
1383
+ window.location.replace("/admin");
1384
+ }
1385
+ })();
1386
+ return () => ac.abort();
1380
1387
  }, [auth?.token]);
1381
1388
  const handleResend = async () => {
1382
1389
  setResendLoading(true);
@@ -1762,6 +1769,10 @@ const EnforcedPage = () => {
1762
1769
  signal: ac.signal
1763
1770
  })
1764
1771
  ]);
1772
+ if (meRes.status === 401) {
1773
+ window.location.replace("/admin/auth/login");
1774
+ return;
1775
+ }
1765
1776
  if (statusRes.ok) {
1766
1777
  const statusBody = await statusRes.json();
1767
1778
  if (statusBody.data?.status === "full") {
@@ -1777,10 +1788,10 @@ const EnforcedPage = () => {
1777
1788
  const meBody = await meRes.json();
1778
1789
  setUserEmail(meBody.data?.email || "");
1779
1790
  }
1791
+ setLoading(false);
1780
1792
  } catch (error) {
1781
1793
  if (error.name === "AbortError") return;
1782
1794
  console.error("Failed to check MFA status:", error);
1783
- } finally {
1784
1795
  setLoading(false);
1785
1796
  }
1786
1797
  })();
@@ -1938,7 +1949,7 @@ const plugin = {
1938
1949
  },
1939
1950
  id: "strapi-identity-settings",
1940
1951
  to: `/${PLUGIN_ID}`,
1941
- Component: () => import("./SettingsPage-Dm_llkYv.mjs"),
1952
+ Component: () => import("./SettingsPage-CcHTu8-f.mjs"),
1942
1953
  permissions: [{ action: "plugin::strapi-identity.settings.update" }]
1943
1954
  });
1944
1955
  app.addMiddlewares([mfaRedirect]);
@@ -1947,14 +1958,14 @@ const plugin = {
1947
1958
  id: "profile-toggle",
1948
1959
  route: "/admin/me",
1949
1960
  selector: '#main-content form[method="put"] > :nth-child(2) > div > div > div:nth-child(2)',
1950
- Component: () => import("./ProfileToggle-k0d-caPC.mjs")
1961
+ Component: () => import("./ProfileToggle-B1UK1opI.mjs")
1951
1962
  });
1952
1963
  injections.registerRoute({
1953
1964
  id: "admin-reset",
1954
1965
  route: "/admin/settings/users/:id",
1955
1966
  selector: '#main-content form[method="put"] > :nth-child(2) > div > div:nth-child(2)',
1956
1967
  permissions: [{ action: "plugin::strapi-identity.settings.update" }],
1957
- Component: () => import("./AdminReset-DOmsyqwQ.mjs")
1968
+ Component: () => import("./AdminReset-DjVX7phX.mjs")
1958
1969
  });
1959
1970
  InjectVerify(app);
1960
1971
  InjectEnforced(app);
@@ -1978,10 +1989,20 @@ const plugin = {
1978
1989
  }
1979
1990
  };
1980
1991
  const mfaRedirect = () => {
1981
- return () => (next) => (action) => {
1982
- if (action && action.type === "admin/login" && (action.payload || {}).hasOwnProperty("token") && action.payload.token === void 0) {
1983
- window.location.replace("/admin/strapi-identity/verify");
1984
- return;
1992
+ return () => (next) => async (action) => {
1993
+ if (action && action.type === "admin/login" && (action.payload || {}).hasOwnProperty("token")) {
1994
+ if (action.payload.token === void 0) {
1995
+ window.location.replace("/admin/strapi-identity/verify");
1996
+ return;
1997
+ }
1998
+ const config = await fetch("/strapi-identity/config", {
1999
+ headers: { authorization: `Bearer ${action.payload.token}` }
2000
+ }).then((res) => res.json());
2001
+ if (config.data?.enabled && config.data?.enforce) {
2002
+ await next(action);
2003
+ window.location.replace("/admin/strapi-identity/enforced");
2004
+ return;
2005
+ }
1985
2006
  }
1986
2007
  return next(action);
1987
2008
  };
@@ -1370,7 +1370,8 @@ const VerifyPage = ({ fallbackIcon }) => {
1370
1370
  `${response.status} ${response.statusText}: ${data.error || "Unknown error"}`
1371
1371
  );
1372
1372
  }
1373
- const target = new URLSearchParams(window.location.search).get("redirectTo") || "/admin";
1373
+ const rawTarget = new URLSearchParams(window.location.search).get("redirectTo") || "/admin";
1374
+ const target = /^\/[^/]/.test(rawTarget) ? rawTarget : "/admin";
1374
1375
  window.location.replace(target);
1375
1376
  } catch (error2) {
1376
1377
  setError(
@@ -1383,20 +1384,26 @@ const VerifyPage = ({ fallbackIcon }) => {
1383
1384
  }
1384
1385
  };
1385
1386
  React.useEffect(() => {
1386
- const mfaToken = document.cookie.split("; ").reduce((acc, cookie) => {
1387
- const [name, value] = cookie.split("=");
1388
- return name === "strapi_admin_mfa" ? value.trim() : acc;
1389
- }, null);
1390
- if (auth?.token || !mfaToken) {
1387
+ if (auth?.token) {
1391
1388
  window.location.replace("/admin");
1392
1389
  return;
1393
1390
  }
1394
- try {
1395
- const payloadBase64 = mfaToken.split(".")[1];
1396
- const decoded = JSON.parse(atob(payloadBase64));
1397
- setMfaType(decoded.mfaType || null);
1398
- } catch {
1399
- }
1391
+ const ac = new AbortController();
1392
+ (async () => {
1393
+ try {
1394
+ const response = await fetch("/strapi-identity/verify/info", { signal: ac.signal });
1395
+ if (!response.ok) {
1396
+ window.location.replace("/admin");
1397
+ return;
1398
+ }
1399
+ const data = await response.json();
1400
+ setMfaType(data.data?.mfaType || null);
1401
+ } catch (error2) {
1402
+ if (error2 instanceof DOMException && error2.name === "AbortError") return;
1403
+ window.location.replace("/admin");
1404
+ }
1405
+ })();
1406
+ return () => ac.abort();
1400
1407
  }, [auth?.token]);
1401
1408
  const handleResend = async () => {
1402
1409
  setResendLoading(true);
@@ -1782,6 +1789,10 @@ const EnforcedPage = () => {
1782
1789
  signal: ac.signal
1783
1790
  })
1784
1791
  ]);
1792
+ if (meRes.status === 401) {
1793
+ window.location.replace("/admin/auth/login");
1794
+ return;
1795
+ }
1785
1796
  if (statusRes.ok) {
1786
1797
  const statusBody = await statusRes.json();
1787
1798
  if (statusBody.data?.status === "full") {
@@ -1797,10 +1808,10 @@ const EnforcedPage = () => {
1797
1808
  const meBody = await meRes.json();
1798
1809
  setUserEmail(meBody.data?.email || "");
1799
1810
  }
1811
+ setLoading(false);
1800
1812
  } catch (error) {
1801
1813
  if (error.name === "AbortError") return;
1802
1814
  console.error("Failed to check MFA status:", error);
1803
- } finally {
1804
1815
  setLoading(false);
1805
1816
  }
1806
1817
  })();
@@ -1958,7 +1969,7 @@ const plugin = {
1958
1969
  },
1959
1970
  id: "strapi-identity-settings",
1960
1971
  to: `/${PLUGIN_ID}`,
1961
- Component: () => Promise.resolve().then(() => require("./SettingsPage-DVVkN1xw.js")),
1972
+ Component: () => Promise.resolve().then(() => require("./SettingsPage-DZDW9kNI.js")),
1962
1973
  permissions: [{ action: "plugin::strapi-identity.settings.update" }]
1963
1974
  });
1964
1975
  app.addMiddlewares([mfaRedirect]);
@@ -1967,14 +1978,14 @@ const plugin = {
1967
1978
  id: "profile-toggle",
1968
1979
  route: "/admin/me",
1969
1980
  selector: '#main-content form[method="put"] > :nth-child(2) > div > div > div:nth-child(2)',
1970
- Component: () => Promise.resolve().then(() => require("./ProfileToggle-BUqs_hxZ.js"))
1981
+ Component: () => Promise.resolve().then(() => require("./ProfileToggle-4u6WWddz.js"))
1971
1982
  });
1972
1983
  injections.registerRoute({
1973
1984
  id: "admin-reset",
1974
1985
  route: "/admin/settings/users/:id",
1975
1986
  selector: '#main-content form[method="put"] > :nth-child(2) > div > div:nth-child(2)',
1976
1987
  permissions: [{ action: "plugin::strapi-identity.settings.update" }],
1977
- Component: () => Promise.resolve().then(() => require("./AdminReset-BiWQDTRv.js"))
1988
+ Component: () => Promise.resolve().then(() => require("./AdminReset-DsKz040S.js"))
1978
1989
  });
1979
1990
  InjectVerify(app);
1980
1991
  InjectEnforced(app);
@@ -1998,10 +2009,20 @@ const plugin = {
1998
2009
  }
1999
2010
  };
2000
2011
  const mfaRedirect = () => {
2001
- return () => (next) => (action) => {
2002
- if (action && action.type === "admin/login" && (action.payload || {}).hasOwnProperty("token") && action.payload.token === void 0) {
2003
- window.location.replace("/admin/strapi-identity/verify");
2004
- return;
2012
+ return () => (next) => async (action) => {
2013
+ if (action && action.type === "admin/login" && (action.payload || {}).hasOwnProperty("token")) {
2014
+ if (action.payload.token === void 0) {
2015
+ window.location.replace("/admin/strapi-identity/verify");
2016
+ return;
2017
+ }
2018
+ const config = await fetch("/strapi-identity/config", {
2019
+ headers: { authorization: `Bearer ${action.payload.token}` }
2020
+ }).then((res) => res.json());
2021
+ if (config.data?.enabled && config.data?.enforce) {
2022
+ await next(action);
2023
+ window.location.replace("/admin/strapi-identity/enforced");
2024
+ return;
2025
+ }
2005
2026
  }
2006
2027
  return next(action);
2007
2028
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-B9P8S4CX.js");
3
+ const index = require("./index-Ce4QOU6Y.js");
4
4
  require("strapi-admin-portal");
5
5
  exports.default = index.plugin;
@@ -1,4 +1,4 @@
1
- import { p } from "./index-DpIJdETG.mjs";
1
+ import { p } from "./index-Bm3H4z3W.mjs";
2
2
  import "strapi-admin-portal";
3
3
  export {
4
4
  p as default
@@ -0,0 +1,9 @@
1
+ export interface ConfirmModalProps {
2
+ open?: boolean;
3
+ onOpenChange?: (open: boolean) => void;
4
+ onSubmit?: React.FormEventHandler<HTMLFormElement>;
5
+ qrCodeUri?: string | null;
6
+ secret?: string | null;
7
+ passcodes?: string[] | null;
8
+ }
9
+ export default function ConfirmModal({ open, onOpenChange, onSubmit, qrCodeUri, secret, passcodes, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default, type ConfirmModalProps } from './ConfirmModal';
@@ -0,0 +1,8 @@
1
+ export interface EmailOTPModalProps {
2
+ mode: 'setup' | 'disable';
3
+ open: boolean;
4
+ email: string;
5
+ onOpenChange: (open: boolean) => void;
6
+ onSuccess: () => void;
7
+ }
8
+ export default function EmailOTPModal({ mode, open, email, onOpenChange, onSuccess, }: EmailOTPModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ type InitializerProps = {
2
+ setPlugin: (id: string) => void;
3
+ };
4
+ declare const Initializer: ({ setPlugin }: InitializerProps) => null;
5
+ export { Initializer };
@@ -0,0 +1,11 @@
1
+ import { OTPInput } from 'input-otp';
2
+ import * as React from 'react';
3
+ declare function InputOTP({ className, containerClassName, ...props }: React.ComponentPropsWithoutRef<typeof OTPInput> & {
4
+ containerClassName?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & {
8
+ index: number;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,6 @@
1
+ export interface RemoveModalProps {
2
+ open: boolean;
3
+ onOpenChange: (open: boolean) => void;
4
+ onSubmit: React.FormEventHandler<HTMLFormElement>;
5
+ }
6
+ export default function RemoveModal({ open, onOpenChange, onSubmit }: RemoveModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default, type RemoveModalProps } from './RemoveModal';
@@ -0,0 +1,10 @@
1
+ export interface WarningAlertProps {
2
+ open: boolean;
3
+ title?: string;
4
+ children: React.ReactNode;
5
+ confirmText?: string;
6
+ loading?: boolean;
7
+ onConfirm: () => void;
8
+ onCancel: () => void;
9
+ }
10
+ export default function WarningAlert({ open, title, children, confirmText, loading, onConfirm, onCancel, }: WarningAlertProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default, type WarningAlertProps } from './WarningAlert';
@@ -0,0 +1,4 @@
1
+ declare const AdminReset: ({ id }: {
2
+ id?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default AdminReset;
@@ -0,0 +1,2 @@
1
+ declare const ProfileToggle: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default ProfileToggle;
@@ -0,0 +1,13 @@
1
+ import { StrapiApp } from '@strapi/strapi/admin';
2
+ import { RouteObject } from 'react-router-dom';
3
+ export interface InjectPublicRouter extends Omit<StrapiApp['router'], 'router'> {
4
+ router: {
5
+ routes: RouteObject[];
6
+ };
7
+ }
8
+ /**
9
+ * Inject the enforced MFA page route into the Strapi admin router
10
+ */
11
+ export declare const InjectEnforced: (app: StrapiApp) => Promise<void>;
12
+ declare const EnforcedPage: () => import("react/jsx-runtime").JSX.Element | null;
13
+ export { EnforcedPage };
@@ -0,0 +1 @@
1
+ export declare const PLUGIN_ID = "strapi-identity";
@@ -0,0 +1,12 @@
1
+ import { StrapiApp } from '@strapi/strapi/admin';
2
+ import { RouteObject } from 'react-router-dom';
3
+ export interface InjectPublicRouter extends Omit<StrapiApp['router'], 'router'> {
4
+ router: {
5
+ routes: RouteObject[];
6
+ };
7
+ }
8
+ /**
9
+ * Inject the verify page route into the Strapi router
10
+ * @param router StrapiApp router instance
11
+ */
12
+ export declare const InjectVerify: (app: StrapiApp) => Promise<void>;
@@ -0,0 +1 @@
1
+ export default function SettingsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const getTranslation: (id: string) => string;
2
+ export { getTranslation };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Retrieves the value of a specified cookie.
3
+ *
4
+ * @param name - The name of the cookie to retrieve.
5
+ * @returns The decoded cookie value if found, otherwise null.
6
+ */
7
+ export declare const getCookieValue: (name: string) => string | null;
8
+ /**
9
+ * Retrieves the JWT token from localStorage or cookies.
10
+ * @returns The JWT token if found, otherwise null.
11
+ */
12
+ export declare const getToken: () => string | null;