strapi-plugin-magic-link-v5 5.5.5 → 5.5.6

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.
@@ -4823,271 +4823,265 @@ var store$1 = ({ strapi: strapi2 }) => ({
4823
4823
  return pluginStore.set({ key: "settings", value: settings });
4824
4824
  }
4825
4825
  });
4826
- var features$1;
4827
- var hasRequiredFeatures;
4828
- function requireFeatures() {
4829
- if (hasRequiredFeatures) return features$1;
4830
- hasRequiredFeatures = 1;
4831
- features$1 = {
4832
- // FREE/DEMO Features
4833
- free: {
4834
- maxTokens: 100,
4835
- // 100 aktive Tokens gleichzeitig
4836
- maxSessions: 50,
4837
- // 50 aktive JWT Sessions
4838
- maxIPBans: 10,
4839
- // 10 gebannte IPs
4840
- features: [
4841
- "basic-magic-link",
4842
- // Basis Magic Link Auth
4843
- "email-templates",
4844
- // Basis Email Templates
4845
- "jwt-sessions",
4846
- // JWT Session Management
4847
- "ip-tracking",
4848
- // IP Tracking für Security
4849
- "rate-limiting",
4850
- // Basis Rate Limiting
4851
- "auto-user-creation",
4852
- // Auto User Creation
4853
- "token-management",
4854
- // Token Dashboard
4855
- "ip-bans"
4856
- // IP Ban Management
4857
- ]
4858
- },
4859
- // PREMIUM Features
4860
- premium: {
4861
- maxTokens: 1e3,
4862
- // 1000 aktive Tokens
4863
- maxSessions: 500,
4864
- // 500 aktive Sessions
4865
- maxIPBans: 100,
4866
- // 100 gebannte IPs
4867
- features: [
4868
- "basic-magic-link",
4869
- "email-templates",
4870
- "jwt-sessions",
4871
- "ip-tracking",
4872
- "rate-limiting",
4873
- "auto-user-creation",
4874
- "token-management",
4875
- "ip-bans",
4876
- "otp-email",
4877
- // Email OTP (6-digit code)
4878
- "mfa-totp",
4879
- // MFA: Magic Link + TOTP (Szenario 1)
4880
- "custom-email-templates",
4881
- // Custom HTML/Text Templates
4882
- "email-designer-integration",
4883
- // Email Designer 5 Support
4884
- "magic-mail-integration",
4885
- // MagicMail Integration
4886
- "advanced-rate-limiting",
4887
- // Custom Rate Limits
4888
- "session-management",
4889
- // Erweiterte Session Verwaltung
4890
- "bulk-operations",
4891
- // Bulk Token/Session Operations
4892
- "extended-logging",
4893
- // Erweiterte Login-Info Logs
4894
- "custom-redirect-urls"
4895
- // Custom Redirect URLs per Token
4896
- ]
4897
- },
4898
- // ADVANCED Features
4899
- advanced: {
4900
- maxTokens: -1,
4901
- // Unlimited
4902
- maxSessions: -1,
4903
- // Unlimited
4904
- maxIPBans: -1,
4905
- // Unlimited
4906
- features: [
4907
- "basic-magic-link",
4908
- "email-templates",
4909
- "jwt-sessions",
4910
- "ip-tracking",
4911
- "rate-limiting",
4912
- "auto-user-creation",
4913
- "token-management",
4914
- "ip-bans",
4915
- "otp-email",
4916
- "mfa-totp",
4917
- // MFA: Magic Link + TOTP (Szenario 1)
4918
- "otp-sms",
4919
- // SMS OTP via Twilio/Vonage
4920
- "otp-totp",
4921
- // TOTP (Authenticator Apps)
4922
- "totp-primary-login",
4923
- // Login with Email + TOTP only (Szenario 2)
4924
- "custom-email-templates",
4925
- "email-designer-integration",
4926
- "magic-mail-integration",
4927
- "advanced-rate-limiting",
4928
- "session-management",
4929
- "bulk-operations",
4930
- "extended-logging",
4931
- "custom-redirect-urls",
4932
- "webhook-notifications",
4933
- // Webhooks für Events
4934
- "api-access-tokens",
4935
- // API Tokens für Programmatic Access
4936
- "advanced-analytics",
4937
- // Analytics Dashboard
4938
- "custom-token-context",
4939
- // Custom Context Data in Tokens
4940
- "geolocation-tracking",
4941
- // GeoIP Tracking
4942
- "device-fingerprinting",
4943
- // Device Fingerprinting
4944
- "suspicious-login-alerts"
4945
- // Alerts für verdächtige Logins
4946
- ]
4947
- },
4948
- // ENTERPRISE Features
4949
- enterprise: {
4950
- maxTokens: -1,
4951
- maxSessions: -1,
4952
- maxIPBans: -1,
4953
- features: [
4954
- "basic-magic-link",
4955
- "email-templates",
4956
- "jwt-sessions",
4957
- "ip-tracking",
4958
- "rate-limiting",
4959
- "auto-user-creation",
4960
- "token-management",
4961
- "ip-bans",
4962
- "otp-email",
4963
- "mfa-totp",
4964
- // MFA: Magic Link + TOTP (Szenario 1)
4965
- "otp-sms",
4966
- "otp-totp",
4967
- "totp-primary-login",
4968
- // Login with Email + TOTP only (Szenario 2)
4969
- "otp-backup-codes",
4970
- // Backup Recovery Codes
4971
- "biometric-support",
4972
- // WebAuthn/FIDO2
4973
- "custom-email-templates",
4974
- "email-designer-integration",
4975
- "magic-mail-integration",
4976
- "advanced-rate-limiting",
4977
- "session-management",
4978
- "bulk-operations",
4979
- "extended-logging",
4980
- "custom-redirect-urls",
4981
- "webhook-notifications",
4982
- "api-access-tokens",
4983
- "advanced-analytics",
4984
- "custom-token-context",
4985
- "geolocation-tracking",
4986
- "device-fingerprinting",
4987
- "suspicious-login-alerts",
4988
- "sso-integration",
4989
- // SSO/SAML Integration
4990
- "ldap-sync",
4991
- // LDAP/AD Sync
4992
- "audit-logs",
4993
- // Vollständige Audit Logs
4994
- "compliance-reports",
4995
- // GDPR/SOC2 Reports
4996
- "priority-support",
4997
- // 24/7 Priority Support
4998
- "custom-security-rules",
4999
- // Custom Security Rules
5000
- "multi-tenant",
5001
- // Multi-Tenant Support
5002
- "white-label"
5003
- // White-Label Branding
5004
- ]
5005
- },
5006
- /**
5007
- * Check if a feature is available for given license tier
5008
- */
5009
- hasFeature(licenseData, featureName) {
5010
- if (!licenseData) {
5011
- return this.free.features.includes(featureName);
5012
- }
5013
- let isEnterprise = false;
5014
- let isAdvanced = false;
5015
- let isPremium = false;
5016
- if (licenseData.tier) {
5017
- isEnterprise = licenseData.tier === "enterprise";
5018
- isAdvanced = licenseData.tier === "advanced";
5019
- isPremium = licenseData.tier === "premium";
5020
- }
5021
- if (licenseData.features) {
5022
- isEnterprise = isEnterprise || licenseData.features.enterprise === true;
5023
- isAdvanced = isAdvanced || licenseData.features.advanced === true;
5024
- isPremium = isPremium || licenseData.features.premium === true;
5025
- }
5026
- if (licenseData.featureEnterprise === true) {
5027
- isEnterprise = true;
5028
- }
5029
- if (licenseData.featureAdvanced === true) {
5030
- isAdvanced = true;
5031
- }
5032
- if (licenseData.featurePremium === true) {
5033
- isPremium = true;
5034
- }
5035
- if (isEnterprise && this.enterprise.features.includes(featureName)) {
5036
- return true;
5037
- }
5038
- if (isAdvanced && this.advanced.features.includes(featureName)) {
5039
- return true;
5040
- }
5041
- if (isPremium && this.premium.features.includes(featureName)) {
5042
- return true;
5043
- }
4826
+ var features$1 = {
4827
+ // FREE/DEMO Features
4828
+ free: {
4829
+ maxTokens: 100,
4830
+ // 100 aktive Tokens gleichzeitig
4831
+ maxSessions: 50,
4832
+ // 50 aktive JWT Sessions
4833
+ maxIPBans: 10,
4834
+ // 10 gebannte IPs
4835
+ features: [
4836
+ "basic-magic-link",
4837
+ // Basis Magic Link Auth
4838
+ "email-templates",
4839
+ // Basis Email Templates
4840
+ "jwt-sessions",
4841
+ // JWT Session Management
4842
+ "ip-tracking",
4843
+ // IP Tracking für Security
4844
+ "rate-limiting",
4845
+ // Basis Rate Limiting
4846
+ "auto-user-creation",
4847
+ // Auto User Creation
4848
+ "token-management",
4849
+ // Token Dashboard
4850
+ "ip-bans"
4851
+ // IP Ban Management
4852
+ ]
4853
+ },
4854
+ // PREMIUM Features
4855
+ premium: {
4856
+ maxTokens: 1e3,
4857
+ // 1000 aktive Tokens
4858
+ maxSessions: 500,
4859
+ // 500 aktive Sessions
4860
+ maxIPBans: 100,
4861
+ // 100 gebannte IPs
4862
+ features: [
4863
+ "basic-magic-link",
4864
+ "email-templates",
4865
+ "jwt-sessions",
4866
+ "ip-tracking",
4867
+ "rate-limiting",
4868
+ "auto-user-creation",
4869
+ "token-management",
4870
+ "ip-bans",
4871
+ "otp-email",
4872
+ // Email OTP (6-digit code)
4873
+ "mfa-totp",
4874
+ // MFA: Magic Link + TOTP (Szenario 1)
4875
+ "custom-email-templates",
4876
+ // Custom HTML/Text Templates
4877
+ "email-designer-integration",
4878
+ // Email Designer 5 Support
4879
+ "magic-mail-integration",
4880
+ // MagicMail Integration
4881
+ "advanced-rate-limiting",
4882
+ // Custom Rate Limits
4883
+ "session-management",
4884
+ // Erweiterte Session Verwaltung
4885
+ "bulk-operations",
4886
+ // Bulk Token/Session Operations
4887
+ "extended-logging",
4888
+ // Erweiterte Login-Info Logs
4889
+ "custom-redirect-urls"
4890
+ // Custom Redirect URLs per Token
4891
+ ]
4892
+ },
4893
+ // ADVANCED Features
4894
+ advanced: {
4895
+ maxTokens: -1,
4896
+ // Unlimited
4897
+ maxSessions: -1,
4898
+ // Unlimited
4899
+ maxIPBans: -1,
4900
+ // Unlimited
4901
+ features: [
4902
+ "basic-magic-link",
4903
+ "email-templates",
4904
+ "jwt-sessions",
4905
+ "ip-tracking",
4906
+ "rate-limiting",
4907
+ "auto-user-creation",
4908
+ "token-management",
4909
+ "ip-bans",
4910
+ "otp-email",
4911
+ "mfa-totp",
4912
+ // MFA: Magic Link + TOTP (Szenario 1)
4913
+ "otp-sms",
4914
+ // SMS OTP via Twilio/Vonage
4915
+ "otp-totp",
4916
+ // TOTP (Authenticator Apps)
4917
+ "totp-primary-login",
4918
+ // Login with Email + TOTP only (Szenario 2)
4919
+ "custom-email-templates",
4920
+ "email-designer-integration",
4921
+ "magic-mail-integration",
4922
+ "advanced-rate-limiting",
4923
+ "session-management",
4924
+ "bulk-operations",
4925
+ "extended-logging",
4926
+ "custom-redirect-urls",
4927
+ "webhook-notifications",
4928
+ // Webhooks für Events
4929
+ "api-access-tokens",
4930
+ // API Tokens für Programmatic Access
4931
+ "advanced-analytics",
4932
+ // Analytics Dashboard
4933
+ "custom-token-context",
4934
+ // Custom Context Data in Tokens
4935
+ "geolocation-tracking",
4936
+ // GeoIP Tracking
4937
+ "device-fingerprinting",
4938
+ // Device Fingerprinting
4939
+ "suspicious-login-alerts"
4940
+ // Alerts für verdächtige Logins
4941
+ ]
4942
+ },
4943
+ // ENTERPRISE Features
4944
+ enterprise: {
4945
+ maxTokens: -1,
4946
+ maxSessions: -1,
4947
+ maxIPBans: -1,
4948
+ features: [
4949
+ "basic-magic-link",
4950
+ "email-templates",
4951
+ "jwt-sessions",
4952
+ "ip-tracking",
4953
+ "rate-limiting",
4954
+ "auto-user-creation",
4955
+ "token-management",
4956
+ "ip-bans",
4957
+ "otp-email",
4958
+ "mfa-totp",
4959
+ // MFA: Magic Link + TOTP (Szenario 1)
4960
+ "otp-sms",
4961
+ "otp-totp",
4962
+ "totp-primary-login",
4963
+ // Login with Email + TOTP only (Szenario 2)
4964
+ "otp-backup-codes",
4965
+ // Backup Recovery Codes
4966
+ "biometric-support",
4967
+ // WebAuthn/FIDO2
4968
+ "custom-email-templates",
4969
+ "email-designer-integration",
4970
+ "magic-mail-integration",
4971
+ "advanced-rate-limiting",
4972
+ "session-management",
4973
+ "bulk-operations",
4974
+ "extended-logging",
4975
+ "custom-redirect-urls",
4976
+ "webhook-notifications",
4977
+ "api-access-tokens",
4978
+ "advanced-analytics",
4979
+ "custom-token-context",
4980
+ "geolocation-tracking",
4981
+ "device-fingerprinting",
4982
+ "suspicious-login-alerts",
4983
+ "sso-integration",
4984
+ // SSO/SAML Integration
4985
+ "ldap-sync",
4986
+ // LDAP/AD Sync
4987
+ "audit-logs",
4988
+ // Vollständige Audit Logs
4989
+ "compliance-reports",
4990
+ // GDPR/SOC2 Reports
4991
+ "priority-support",
4992
+ // 24/7 Priority Support
4993
+ "custom-security-rules",
4994
+ // Custom Security Rules
4995
+ "multi-tenant",
4996
+ // Multi-Tenant Support
4997
+ "white-label"
4998
+ // White-Label Branding
4999
+ ]
5000
+ },
5001
+ /**
5002
+ * Check if a feature is available for given license tier
5003
+ */
5004
+ hasFeature(licenseData, featureName) {
5005
+ if (!licenseData) {
5044
5006
  return this.free.features.includes(featureName);
5045
- },
5046
- /**
5047
- * Get max allowed tokens for license tier
5048
- */
5049
- getMaxTokens(licenseData) {
5050
- if (!licenseData) return this.free.maxTokens;
5051
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxTokens;
5052
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxTokens;
5053
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxTokens;
5054
- return this.free.maxTokens;
5055
- },
5056
- /**
5057
- * Get max allowed sessions for license tier
5058
- */
5059
- getMaxSessions(licenseData) {
5060
- if (!licenseData) return this.free.maxSessions;
5061
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxSessions;
5062
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxSessions;
5063
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxSessions;
5064
- return this.free.maxSessions;
5065
- },
5066
- /**
5067
- * Get max allowed IP bans for license tier
5068
- */
5069
- getMaxIPBans(licenseData) {
5070
- if (!licenseData) return this.free.maxIPBans;
5071
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxIPBans;
5072
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxIPBans;
5073
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxIPBans;
5074
- return this.free.maxIPBans;
5075
- },
5076
- /**
5077
- * Get tier name from license data
5078
- */
5079
- getTierName(licenseData) {
5080
- if (!licenseData) return "free";
5081
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return "enterprise";
5082
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return "advanced";
5083
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return "premium";
5084
- return "free";
5085
5007
  }
5086
- };
5087
- return features$1;
5088
- }
5008
+ let isEnterprise = false;
5009
+ let isAdvanced = false;
5010
+ let isPremium = false;
5011
+ if (licenseData.tier) {
5012
+ isEnterprise = licenseData.tier === "enterprise";
5013
+ isAdvanced = licenseData.tier === "advanced";
5014
+ isPremium = licenseData.tier === "premium";
5015
+ }
5016
+ if (licenseData.features) {
5017
+ isEnterprise = isEnterprise || licenseData.features.enterprise === true;
5018
+ isAdvanced = isAdvanced || licenseData.features.advanced === true;
5019
+ isPremium = isPremium || licenseData.features.premium === true;
5020
+ }
5021
+ if (licenseData.featureEnterprise === true) {
5022
+ isEnterprise = true;
5023
+ }
5024
+ if (licenseData.featureAdvanced === true) {
5025
+ isAdvanced = true;
5026
+ }
5027
+ if (licenseData.featurePremium === true) {
5028
+ isPremium = true;
5029
+ }
5030
+ if (isEnterprise && this.enterprise.features.includes(featureName)) {
5031
+ return true;
5032
+ }
5033
+ if (isAdvanced && this.advanced.features.includes(featureName)) {
5034
+ return true;
5035
+ }
5036
+ if (isPremium && this.premium.features.includes(featureName)) {
5037
+ return true;
5038
+ }
5039
+ return this.free.features.includes(featureName);
5040
+ },
5041
+ /**
5042
+ * Get max allowed tokens for license tier
5043
+ */
5044
+ getMaxTokens(licenseData) {
5045
+ if (!licenseData) return this.free.maxTokens;
5046
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxTokens;
5047
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxTokens;
5048
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxTokens;
5049
+ return this.free.maxTokens;
5050
+ },
5051
+ /**
5052
+ * Get max allowed sessions for license tier
5053
+ */
5054
+ getMaxSessions(licenseData) {
5055
+ if (!licenseData) return this.free.maxSessions;
5056
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxSessions;
5057
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxSessions;
5058
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxSessions;
5059
+ return this.free.maxSessions;
5060
+ },
5061
+ /**
5062
+ * Get max allowed IP bans for license tier
5063
+ */
5064
+ getMaxIPBans(licenseData) {
5065
+ if (!licenseData) return this.free.maxIPBans;
5066
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxIPBans;
5067
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxIPBans;
5068
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxIPBans;
5069
+ return this.free.maxIPBans;
5070
+ },
5071
+ /**
5072
+ * Get tier name from license data
5073
+ */
5074
+ getTierName(licenseData) {
5075
+ if (!licenseData) return "free";
5076
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return "enterprise";
5077
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return "advanced";
5078
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return "premium";
5079
+ return "free";
5080
+ }
5081
+ };
5089
5082
  const crypto$1 = require$$0__default.default;
5090
5083
  const os = require$$1__default$3.default;
5084
+ const features = features$1;
5091
5085
  const LICENSE_SERVER_URL = "https://magicapi.fitlex.me";
5092
5086
  const envTimeout = Number(process.env.MAGIC_LICENSE_TIMEOUT_MS);
5093
5087
  const DEFAULT_FETCH_TIMEOUT_MS = Number.isFinite(envTimeout) && envTimeout > 0 ? envTimeout : 12e3;
@@ -5469,14 +5463,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5469
5463
  */
5470
5464
  async hasFeature(featureName) {
5471
5465
  try {
5472
- const features2 = requireFeatures();
5473
5466
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5474
5467
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5475
5468
  if (!licenseKey) {
5476
- return features2.hasFeature(null, featureName);
5469
+ return features.hasFeature(null, featureName);
5477
5470
  }
5478
5471
  const licenseData = await this.getLicenseByKey(licenseKey);
5479
- return features2.hasFeature(licenseData, featureName);
5472
+ return features.hasFeature(licenseData, featureName);
5480
5473
  } catch (error) {
5481
5474
  strapi2.log.error("Error checking feature:", error);
5482
5475
  return false;
@@ -5488,14 +5481,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5488
5481
  */
5489
5482
  async getMaxTokens() {
5490
5483
  try {
5491
- const features2 = requireFeatures();
5492
5484
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5493
5485
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5494
5486
  if (!licenseKey) {
5495
- return features2.getMaxTokens(null);
5487
+ return features.getMaxTokens(null);
5496
5488
  }
5497
5489
  const licenseData = await this.getLicenseByKey(licenseKey);
5498
- return features2.getMaxTokens(licenseData);
5490
+ return features.getMaxTokens(licenseData);
5499
5491
  } catch (error) {
5500
5492
  strapi2.log.error("Error getting max tokens:", error);
5501
5493
  return features.free.maxTokens;
@@ -5507,14 +5499,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5507
5499
  */
5508
5500
  async getMaxSessions() {
5509
5501
  try {
5510
- const features2 = requireFeatures();
5511
5502
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5512
5503
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5513
5504
  if (!licenseKey) {
5514
- return features2.getMaxSessions(null);
5505
+ return features.getMaxSessions(null);
5515
5506
  }
5516
5507
  const licenseData = await this.getLicenseByKey(licenseKey);
5517
- return features2.getMaxSessions(licenseData);
5508
+ return features.getMaxSessions(licenseData);
5518
5509
  } catch (error) {
5519
5510
  strapi2.log.error("Error getting max sessions:", error);
5520
5511
  return features.free.maxSessions;
@@ -5526,14 +5517,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5526
5517
  */
5527
5518
  async getMaxIPBans() {
5528
5519
  try {
5529
- const features2 = requireFeatures();
5530
5520
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5531
5521
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5532
5522
  if (!licenseKey) {
5533
- return features2.getMaxIPBans(null);
5523
+ return features.getMaxIPBans(null);
5534
5524
  }
5535
5525
  const licenseData = await this.getLicenseByKey(licenseKey);
5536
- return features2.getMaxIPBans(licenseData);
5526
+ return features.getMaxIPBans(licenseData);
5537
5527
  } catch (error) {
5538
5528
  strapi2.log.error("Error getting max IP bans:", error);
5539
5529
  return features.free.maxIPBans;
@@ -5545,14 +5535,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5545
5535
  */
5546
5536
  async getAvailableOTPTypes() {
5547
5537
  try {
5548
- const features2 = requireFeatures();
5549
5538
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5550
5539
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5551
5540
  if (!licenseKey) {
5552
- return features2.getAvailableOTPTypes(null);
5541
+ return features.getAvailableOTPTypes(null);
5553
5542
  }
5554
5543
  const licenseData = await this.getLicenseByKey(licenseKey);
5555
- return features2.getAvailableOTPTypes(licenseData);
5544
+ return features.getAvailableOTPTypes(licenseData);
5556
5545
  } catch (error) {
5557
5546
  strapi2.log.error("Error getting available OTP types:", error);
5558
5547
  return [];