strapi-plugin-magic-link-v5 5.5.8 → 5.5.9

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.5.9](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.8...v5.5.9) (2026-05-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * trigger release for plugin always-on refactor ([2ed54eb](https://github.com/Schero94/strapi-plugin-magic-link-v5/commit/2ed54eb228bccc84f1cd013741f98de69edf2268))
7
+
1
8
  ## [5.5.8](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.7...v5.5.8) (2026-05-03)
2
9
 
3
10
 
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl";
5
5
  import { Flex, Loader, Box, Typography, Button, TextInput, Badge } from "@strapi/design-system";
6
6
  import { Phone, Check, Message, ArrowClockwise } from "@strapi/icons";
7
7
  import { useNotification, useFetchClient } from "@strapi/strapi/admin";
8
- import { g as getTrad } from "./index-Bj-erY7g.mjs";
8
+ import { g as getTrad } from "./index-DQUYFsLT.mjs";
9
9
  const theme = {
10
10
  colors: {
11
11
  primary: { 700: "#075985", 100: "#E0F2FE", 50: "#F0F9FF" },
@@ -7,7 +7,7 @@ const styled = require("styled-components");
7
7
  const reactIntl = require("react-intl");
8
8
  const designSystem = require("@strapi/design-system");
9
9
  const icons = require("@strapi/icons");
10
- const index = require("./index-CGxbhJfg.js");
10
+ const index = require("./index-Bj3H_Z4B.js");
11
11
  const admin = require("@strapi/strapi/admin");
12
12
  const LicenseGuard = require("./LicenseGuard-CiyjFnrw.js");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -61,7 +61,7 @@ const index = {
61
61
  },
62
62
  Component: () => Promise.resolve().then(() => require(
63
63
  /* webpackChunkName: "magic-link-tokens" */
64
- "./index-XYWLmmEs.js"
64
+ "./index-BWuj-5WE.js"
65
65
  )),
66
66
  permissions: pluginPermissions.access
67
67
  });
@@ -83,7 +83,7 @@ const index = {
83
83
  to: `${PLUGIN_ID}/config`,
84
84
  Component: () => Promise.resolve().then(() => require(
85
85
  /* webpackChunkName: "magic-link-settings" */
86
- "./index-zzoovbM0.js"
86
+ "./index-DJqXiiP1.js"
87
87
  )),
88
88
  permissions: pluginPermissions.readSettings
89
89
  },
@@ -109,7 +109,7 @@ const index = {
109
109
  to: `${PLUGIN_ID}/whatsapp`,
110
110
  Component: () => Promise.resolve().then(() => require(
111
111
  /* webpackChunkName: "magic-link-whatsapp" */
112
- "./index-I72rBTkL.js"
112
+ "./index-CC4Eu9Dm.js"
113
113
  )),
114
114
  permissions: pluginPermissions.access
115
115
  }
@@ -7,7 +7,7 @@ const reactIntl = require("react-intl");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const admin = require("@strapi/strapi/admin");
10
- const index = require("./index-CGxbhJfg.js");
10
+ const index = require("./index-Bj3H_Z4B.js");
11
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
13
  const theme = {
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl";
5
5
  import { Box, Typography, Flex, Button, Accordion, SingleSelect, SingleSelectOption, Grid, Switch, NumberInput, TextInput, Divider, Textarea, Badge } from "@strapi/design-system";
6
6
  import { Check, Cog, Lightning, Shield, Mail, CheckCircle, Code, Link, Lock, Key } from "@strapi/icons";
7
7
  import { useNotification, useFetchClient } from "@strapi/strapi/admin";
8
- import { g as getTrad } from "./index-Bj-erY7g.mjs";
8
+ import { g as getTrad } from "./index-DQUYFsLT.mjs";
9
9
  import { u as usePluginLanguage, L as LicenseGuard, a as LanguageProvider } from "./LicenseGuard-DJ5fq2UZ.mjs";
10
10
  const EMAIL_TEMPLATES = {
11
11
  modern: {
@@ -991,19 +991,6 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
991
991
  /* @__PURE__ */ jsx(Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "8px", display: "block", textAlign: "center", color: "var(--colors-neutral700)" }, children: formatMessage({ id: getTrad("settings.features.title") }) }),
992
992
  /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", style: { marginBottom: "20px", display: "block", textAlign: "center", fontSize: "12px" }, children: formatMessage({ id: getTrad("settings.features.subtitle") }) }),
993
993
  /* @__PURE__ */ jsxs(Grid.Root, { gap: 4, children: [
994
- /* @__PURE__ */ jsx(Grid.Item, { col: 4, s: 6, xs: 12, children: /* @__PURE__ */ jsx(ToggleCard, { $active: settings.enabled, $statusLabel: settings.enabled ? statusActive : statusInactive, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 3, children: [
995
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", alignItems: "center", style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsx(
996
- Switch,
997
- {
998
- checked: settings.enabled,
999
- onCheckedChange: (checked) => updateSetting("enabled", checked)
1000
- }
1001
- ) }),
1002
- /* @__PURE__ */ jsxs(Box, { children: [
1003
- /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", style: { fontSize: "14px", marginBottom: "6px", display: "block", textAlign: "center" }, children: formatMessage({ id: getTrad("settings.feature.enabled.title") }) }),
1004
- /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "neutral600", style: { fontSize: "12px", lineHeight: "1.4", textAlign: "center" }, children: formatMessage({ id: getTrad("settings.feature.enabled.description") }) })
1005
- ] })
1006
- ] }) }) }),
1007
994
  /* @__PURE__ */ jsx(Grid.Item, { col: 4, s: 6, xs: 12, children: /* @__PURE__ */ jsx(ToggleCard, { $active: settings.createUserIfNotExists, $statusLabel: settings.createUserIfNotExists ? statusActive : statusInactive, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 3, children: [
1008
995
  /* @__PURE__ */ jsx(Flex, { justifyContent: "center", alignItems: "center", style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsx(
1009
996
  Switch,
@@ -7,7 +7,7 @@ const reactIntl = require("react-intl");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const admin = require("@strapi/strapi/admin");
10
- const index = require("./index-CGxbhJfg.js");
10
+ const index = require("./index-Bj3H_Z4B.js");
11
11
  const LicenseGuard = require("./LicenseGuard-CiyjFnrw.js");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -995,19 +995,6 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
995
995
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "8px", display: "block", textAlign: "center", color: "var(--colors-neutral700)" }, children: formatMessage({ id: index.getTrad("settings.features.title") }) }),
996
996
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { marginBottom: "20px", display: "block", textAlign: "center", fontSize: "12px" }, children: formatMessage({ id: index.getTrad("settings.features.subtitle") }) }),
997
997
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid.Root, { gap: 4, children: [
998
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 4, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleCard, { $active: settings.enabled, $statusLabel: settings.enabled ? statusActive : statusInactive, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, children: [
999
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", alignItems: "center", style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
1000
- designSystem.Switch,
1001
- {
1002
- checked: settings.enabled,
1003
- onCheckedChange: (checked) => updateSetting("enabled", checked)
1004
- }
1005
- ) }),
1006
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
1007
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", style: { fontSize: "14px", marginBottom: "6px", display: "block", textAlign: "center" }, children: formatMessage({ id: index.getTrad("settings.feature.enabled.title") }) }),
1008
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "neutral600", style: { fontSize: "12px", lineHeight: "1.4", textAlign: "center" }, children: formatMessage({ id: index.getTrad("settings.feature.enabled.description") }) })
1009
- ] })
1010
- ] }) }) }),
1011
998
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 4, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleCard, { $active: settings.createUserIfNotExists, $statusLabel: settings.createUserIfNotExists ? statusActive : statusInactive, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, children: [
1012
999
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", alignItems: "center", style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
1013
1000
  designSystem.Switch,
@@ -60,7 +60,7 @@ const index = {
60
60
  },
61
61
  Component: () => import(
62
62
  /* webpackChunkName: "magic-link-tokens" */
63
- "./index-B9Ch8Jpe.mjs"
63
+ "./index-szeYJKpN.mjs"
64
64
  ),
65
65
  permissions: pluginPermissions.access
66
66
  });
@@ -82,7 +82,7 @@ const index = {
82
82
  to: `${PLUGIN_ID}/config`,
83
83
  Component: () => import(
84
84
  /* webpackChunkName: "magic-link-settings" */
85
- "./index-SCxv154G.mjs"
85
+ "./index-Csyi13vd.mjs"
86
86
  ),
87
87
  permissions: pluginPermissions.readSettings
88
88
  },
@@ -108,7 +108,7 @@ const index = {
108
108
  to: `${PLUGIN_ID}/whatsapp`,
109
109
  Component: () => import(
110
110
  /* webpackChunkName: "magic-link-whatsapp" */
111
- "./index-DF3Edydl.mjs"
111
+ "./index-5jsDgD-q.mjs"
112
112
  ),
113
113
  permissions: pluginPermissions.access
114
114
  }
@@ -5,7 +5,7 @@ import styled, { keyframes, css } from "styled-components";
5
5
  import { useIntl } from "react-intl";
6
6
  import { Box, Flex, Typography, Button, TextInput, Textarea, Checkbox, IconButton, Loader, Searchbar, SingleSelect, SingleSelectOption, Thead, Tr, Th, Tbody, Td, Pagination, PreviousLink, PageLink, NextLink, Table, Badge, VisuallyHidden, Main } from "@strapi/design-system";
7
7
  import { Cross, Sparkle, Check, Shield, Clock, Lock, Trash, ArrowClockwise, CaretDown, User, Monitor, Calendar, Plus, Earth, WarningCircle, Server, Eye, Mail, Cog, Key, Link } from "@strapi/icons";
8
- import { g as getTrad, P as PLUGIN_ID } from "./index-Bj-erY7g.mjs";
8
+ import { g as getTrad, P as PLUGIN_ID } from "./index-DQUYFsLT.mjs";
9
9
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
10
10
  import { L as LicenseGuard, a as LanguageProvider } from "./LicenseGuard-DJ5fq2UZ.mjs";
11
11
  const CreateTokenModal = ({ isOpen, onClose, onSubmit, formData, setFormData }) => {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-CGxbhJfg.js");
2
+ const index = require("../_chunks/index-Bj3H_Z4B.js");
3
3
  require("@strapi/icons");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-Bj-erY7g.mjs";
1
+ import { i } from "../_chunks/index-DQUYFsLT.mjs";
2
2
  import "@strapi/icons";
3
3
  export {
4
4
  i as default
@@ -1171,10 +1171,6 @@ var auth$1 = {
1171
1171
  const rateLimiter2 = strapi.plugin("magic-link").service("rate-limiter");
1172
1172
  const userService = strapi.plugin("users-permissions").service("user");
1173
1173
  const jwtService = strapi.plugin("users-permissions").service("jwt");
1174
- const isEnabled = await magicLink2.isEnabled();
1175
- if (!isEnabled) {
1176
- return i18n.sendError(ctx, "plugin.disabled", 400);
1177
- }
1178
1174
  if (_$1.isEmpty(loginToken)) {
1179
1175
  return i18n.sendError(ctx, "token.invalid", 400);
1180
1176
  }
@@ -1393,10 +1389,6 @@ var auth$1 = {
1393
1389
  const magicLink2 = strapi.plugin("magic-link").service("magic-link");
1394
1390
  const rateLimiter2 = strapi.plugin("magic-link").service("rate-limiter");
1395
1391
  const whatsappService = strapi.plugin("magic-link").service("whatsapp");
1396
- const isEnabled = await magicLink2.isEnabled();
1397
- if (!isEnabled) {
1398
- return i18n.sendError(ctx, "plugin.disabled", 400);
1399
- }
1400
1392
  const params = parseBody$1(sendLinkSchema, ctx.request.body);
1401
1393
  const email2 = params.email || null;
1402
1394
  const phoneNumber = params.phoneNumber || params.phone || null;
@@ -2469,14 +2461,6 @@ var tokens$1 = {
2469
2461
  if (token2.expires_at && new Date(token2.expires_at) < /* @__PURE__ */ new Date()) {
2470
2462
  return ctx.badRequest("Token ist abgelaufen");
2471
2463
  }
2472
- const pluginStore = strapi.store({
2473
- type: "plugin",
2474
- name: "magic-link"
2475
- });
2476
- const settings = await pluginStore.get({ key: "settings" });
2477
- if (!settings || !settings.enabled) {
2478
- return ctx.badRequest("Magic Link ist nicht aktiviert");
2479
- }
2480
2464
  return ctx.badRequest("Token kann nicht erneut gesendet werden - der Original-Token ist gehashed. Bitte erstelle einen neuen Token für diese E-Mail.");
2481
2465
  } catch (error) {
2482
2466
  strapi.log.error("Fehler beim erneuten Senden:", error);
@@ -2643,7 +2627,7 @@ var tokens$1 = {
2643
2627
  else if (jwtDays <= 30) jwtLifetimePoints = 5;
2644
2628
  let configPoints = 0;
2645
2629
  if (settings.createUserIfNotExists === false && settings.create_new_user === false) configPoints += 10;
2646
- if (settings.enabled === true) configPoints += 5;
2630
+ configPoints += 5;
2647
2631
  if (settings.remember_me === false) configPoints += 5;
2648
2632
  if (settings.stays_valid === false) configPoints += 10;
2649
2633
  let tokenStatusPoints = 0;
@@ -4167,9 +4151,17 @@ var magicLink$1 = ({ strapi: strapi2 }) => ({
4167
4151
  });
4168
4152
  return pluginStore.get({ key: "advanced" });
4169
4153
  },
4154
+ /**
4155
+ * Returns whether the Magic Link plugin is active. In the marketplace
4156
+ * build the plugin is always-on once installed: it cannot be disabled
4157
+ * from the admin panel by mistake (that toggle was removed). The
4158
+ * function is kept as a stable export so any legacy caller continues
4159
+ * to compile.
4160
+ *
4161
+ * @returns {Promise<boolean>} always true
4162
+ */
4170
4163
  async isEnabled() {
4171
- const settings = await this.settings();
4172
- return settings ? settings.enabled !== false : true;
4164
+ return true;
4173
4165
  },
4174
4166
  async createUser(user) {
4175
4167
  const userSettings = await this.userSettings();
@@ -1158,10 +1158,6 @@ var auth$1 = {
1158
1158
  const rateLimiter2 = strapi.plugin("magic-link").service("rate-limiter");
1159
1159
  const userService = strapi.plugin("users-permissions").service("user");
1160
1160
  const jwtService = strapi.plugin("users-permissions").service("jwt");
1161
- const isEnabled = await magicLink2.isEnabled();
1162
- if (!isEnabled) {
1163
- return i18n.sendError(ctx, "plugin.disabled", 400);
1164
- }
1165
1161
  if (_$1.isEmpty(loginToken)) {
1166
1162
  return i18n.sendError(ctx, "token.invalid", 400);
1167
1163
  }
@@ -1380,10 +1376,6 @@ var auth$1 = {
1380
1376
  const magicLink2 = strapi.plugin("magic-link").service("magic-link");
1381
1377
  const rateLimiter2 = strapi.plugin("magic-link").service("rate-limiter");
1382
1378
  const whatsappService = strapi.plugin("magic-link").service("whatsapp");
1383
- const isEnabled = await magicLink2.isEnabled();
1384
- if (!isEnabled) {
1385
- return i18n.sendError(ctx, "plugin.disabled", 400);
1386
- }
1387
1379
  const params = parseBody$1(sendLinkSchema, ctx.request.body);
1388
1380
  const email2 = params.email || null;
1389
1381
  const phoneNumber = params.phoneNumber || params.phone || null;
@@ -2456,14 +2448,6 @@ var tokens$1 = {
2456
2448
  if (token2.expires_at && new Date(token2.expires_at) < /* @__PURE__ */ new Date()) {
2457
2449
  return ctx.badRequest("Token ist abgelaufen");
2458
2450
  }
2459
- const pluginStore = strapi.store({
2460
- type: "plugin",
2461
- name: "magic-link"
2462
- });
2463
- const settings = await pluginStore.get({ key: "settings" });
2464
- if (!settings || !settings.enabled) {
2465
- return ctx.badRequest("Magic Link ist nicht aktiviert");
2466
- }
2467
2451
  return ctx.badRequest("Token kann nicht erneut gesendet werden - der Original-Token ist gehashed. Bitte erstelle einen neuen Token für diese E-Mail.");
2468
2452
  } catch (error) {
2469
2453
  strapi.log.error("Fehler beim erneuten Senden:", error);
@@ -2630,7 +2614,7 @@ var tokens$1 = {
2630
2614
  else if (jwtDays <= 30) jwtLifetimePoints = 5;
2631
2615
  let configPoints = 0;
2632
2616
  if (settings.createUserIfNotExists === false && settings.create_new_user === false) configPoints += 10;
2633
- if (settings.enabled === true) configPoints += 5;
2617
+ configPoints += 5;
2634
2618
  if (settings.remember_me === false) configPoints += 5;
2635
2619
  if (settings.stays_valid === false) configPoints += 10;
2636
2620
  let tokenStatusPoints = 0;
@@ -4154,9 +4138,17 @@ var magicLink$1 = ({ strapi: strapi2 }) => ({
4154
4138
  });
4155
4139
  return pluginStore.get({ key: "advanced" });
4156
4140
  },
4141
+ /**
4142
+ * Returns whether the Magic Link plugin is active. In the marketplace
4143
+ * build the plugin is always-on once installed: it cannot be disabled
4144
+ * from the admin panel by mistake (that toggle was removed). The
4145
+ * function is kept as a stable export so any legacy caller continues
4146
+ * to compile.
4147
+ *
4148
+ * @returns {Promise<boolean>} always true
4149
+ */
4157
4150
  async isEnabled() {
4158
- const settings = await this.settings();
4159
- return settings ? settings.enabled !== false : true;
4151
+ return true;
4160
4152
  },
4161
4153
  async createUser(user) {
4162
4154
  const userSettings = await this.userSettings();
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.5.8",
2
+ "version": "5.5.9",
3
3
  "keywords": [
4
4
  "strapi",
5
5
  "plugin",