@webbycrown/webbycommerce 1.1.2 → 1.2.0
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/README.md +11 -2
- package/dist/_chunks/{Settings-D6uf1nI1.js → Settings-DZXAkI24.js} +131 -1
- package/dist/_chunks/{Settings-VM6V_KJt.mjs → Settings-yLx-YvVy.mjs} +131 -1
- package/dist/_chunks/{en-DIeqB4AB.js → en-CiQ97iC8.js} +15 -0
- package/dist/_chunks/{en-7gtFcumM.mjs → en-DE15m4xZ.mjs} +15 -0
- package/dist/_chunks/{index-BHqcM1qU.mjs → index-CXGrFKp6.mjs} +3 -3
- package/dist/_chunks/{index-RtBCA1lD.js → index-DgocXUgC.js} +3 -3
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +3246 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -580,10 +580,19 @@ Authorization: Bearer YOUR_JWT_TOKEN
|
|
|
580
580
|
|
|
581
581
|
## 📜 Changelog
|
|
582
582
|
|
|
583
|
-
## [1.
|
|
583
|
+
## [1.2.0] - New feature
|
|
584
|
+
|
|
585
|
+
### Added
|
|
586
|
+
- Created auth login method API
|
|
587
|
+
- Created unified auth method API
|
|
588
|
+
|
|
589
|
+
### Fixed
|
|
590
|
+
- Fixed bugs of update schema
|
|
591
|
+
|
|
592
|
+
## [1.1.2] - Patch Release
|
|
584
593
|
- Fixed bugs and resolved issues with the category slug API.
|
|
585
594
|
|
|
586
|
-
## [1.1.0]
|
|
595
|
+
## [1.1.0] - New feature
|
|
587
596
|
- Added Bulk Product API
|
|
588
597
|
|
|
589
598
|
## [1.0.2] – Patch Release
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const reactIntl = require("react-intl");
|
|
6
6
|
const designSystem = require("@strapi/design-system");
|
|
7
|
-
const index = require("./index-
|
|
7
|
+
const index = require("./index-DgocXUgC.js");
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
9
|
require("react-dom/client");
|
|
10
10
|
const ReactDOM = require("react-dom");
|
|
@@ -26486,6 +26486,97 @@ const ApiCollectionsContent = () => {
|
|
|
26486
26486
|
"email": "user@example.com",
|
|
26487
26487
|
"otp": "123456",
|
|
26488
26488
|
"type": "email"
|
|
26489
|
+
}`
|
|
26490
|
+
},
|
|
26491
|
+
{
|
|
26492
|
+
id: "auth-method",
|
|
26493
|
+
method: "GET",
|
|
26494
|
+
path: getApiPath("/api/webbycommerce/auth/method"),
|
|
26495
|
+
title: formatMessage({
|
|
26496
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.title`,
|
|
26497
|
+
defaultMessage: "Get Authentication Method"
|
|
26498
|
+
}),
|
|
26499
|
+
summary: formatMessage({
|
|
26500
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.summary`,
|
|
26501
|
+
defaultMessage: "Get the current authentication method (default or otp) configured in the plugin settings. Use this endpoint in your frontend to determine which authentication flow to display."
|
|
26502
|
+
}),
|
|
26503
|
+
auth: formatMessage({
|
|
26504
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.auth`,
|
|
26505
|
+
defaultMessage: "Auth: public (no authentication required)."
|
|
26506
|
+
}),
|
|
26507
|
+
response: `{
|
|
26508
|
+
"method": "default",
|
|
26509
|
+
"message": "Current authentication method: default"
|
|
26510
|
+
}`,
|
|
26511
|
+
usage: [
|
|
26512
|
+
formatMessage({
|
|
26513
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.usage.frontend`,
|
|
26514
|
+
defaultMessage: "Call this endpoint on app initialization to determine which auth UI to show."
|
|
26515
|
+
}),
|
|
26516
|
+
formatMessage({
|
|
26517
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.usage.conditional`,
|
|
26518
|
+
defaultMessage: 'If method is "otp", show OTP login/register form. If "default", show email/password form.'
|
|
26519
|
+
}),
|
|
26520
|
+
formatMessage({
|
|
26521
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.authMethod.usage.dynamic`,
|
|
26522
|
+
defaultMessage: "Method can change based on plugin settings, so check this endpoint periodically."
|
|
26523
|
+
})
|
|
26524
|
+
],
|
|
26525
|
+
getCurl: () => `curl http://localhost:1337${getApiPath("/api/webbycommerce/auth/method")}`
|
|
26526
|
+
},
|
|
26527
|
+
{
|
|
26528
|
+
id: "unified-auth",
|
|
26529
|
+
method: "POST",
|
|
26530
|
+
path: getApiPath("/api/webbycommerce/auth/unified"),
|
|
26531
|
+
title: formatMessage({
|
|
26532
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.title`,
|
|
26533
|
+
defaultMessage: "Unified Authentication"
|
|
26534
|
+
}),
|
|
26535
|
+
summary: formatMessage({
|
|
26536
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.summary`,
|
|
26537
|
+
defaultMessage: "Unified authentication endpoint that supports both OTP and default (email/password) methods. Automatically detects which method to use based on request body. Perfect for frontends that want to support both authentication methods simultaneously."
|
|
26538
|
+
}),
|
|
26539
|
+
auth: formatMessage({
|
|
26540
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.auth`,
|
|
26541
|
+
defaultMessage: "Auth: public (no authentication required)."
|
|
26542
|
+
}),
|
|
26543
|
+
response: `{
|
|
26544
|
+
"success": true,
|
|
26545
|
+
"step": "login",
|
|
26546
|
+
"method": "default",
|
|
26547
|
+
"message": "Login successfully!",
|
|
26548
|
+
"jwt": "eyJhbGciOi...",
|
|
26549
|
+
"user": {
|
|
26550
|
+
"id": 1,
|
|
26551
|
+
"username": "user1234",
|
|
26552
|
+
"email": "user@example.com"
|
|
26553
|
+
}
|
|
26554
|
+
}`,
|
|
26555
|
+
usage: [
|
|
26556
|
+
formatMessage({
|
|
26557
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.unified`,
|
|
26558
|
+
defaultMessage: "Use this single endpoint for all authentication needs - OTP and default methods."
|
|
26559
|
+
}),
|
|
26560
|
+
formatMessage({
|
|
26561
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.otp`,
|
|
26562
|
+
defaultMessage: 'For OTP: First call with step="request" and email/mobile, then call with step="verify" and OTP code.'
|
|
26563
|
+
}),
|
|
26564
|
+
formatMessage({
|
|
26565
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.default`,
|
|
26566
|
+
defaultMessage: 'For default: Call with step="login" and identifier/password, or step="register" with username/email/password.'
|
|
26567
|
+
}),
|
|
26568
|
+
formatMessage({
|
|
26569
|
+
id: `${index.PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.auto`,
|
|
26570
|
+
defaultMessage: 'Method is auto-detected from request body, or specify authMethod="otp" or "default" explicitly.'
|
|
26571
|
+
})
|
|
26572
|
+
],
|
|
26573
|
+
getCurl: () => `curl -X POST http://localhost:1337${getApiPath("/api/webbycommerce/auth/unified")} \\
|
|
26574
|
+
-H "Content-Type: application/json" \\
|
|
26575
|
+
-d '{"step": "login", "identifier": "user@example.com", "password": "password"}'`,
|
|
26576
|
+
requestBody: `{
|
|
26577
|
+
"step": "login",
|
|
26578
|
+
"identifier": "user@example.com",
|
|
26579
|
+
"password": "password"
|
|
26489
26580
|
}`
|
|
26490
26581
|
},
|
|
26491
26582
|
{
|
|
@@ -30879,6 +30970,45 @@ const LoginRegisterContent = () => {
|
|
|
30879
30970
|
] })
|
|
30880
30971
|
] })
|
|
30881
30972
|
}
|
|
30973
|
+
),
|
|
30974
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30975
|
+
designSystem.Box,
|
|
30976
|
+
{
|
|
30977
|
+
as: "label",
|
|
30978
|
+
padding: 3,
|
|
30979
|
+
background: method === "both" ? "primary100" : "neutral0",
|
|
30980
|
+
hasRadius: true,
|
|
30981
|
+
style: {
|
|
30982
|
+
cursor: "pointer",
|
|
30983
|
+
border: `1px solid ${method === "both" ? "#4945ff" : "#dcdce4"}`
|
|
30984
|
+
},
|
|
30985
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "flex-start", children: [
|
|
30986
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30987
|
+
"input",
|
|
30988
|
+
{
|
|
30989
|
+
type: "radio",
|
|
30990
|
+
name: "loginMethod",
|
|
30991
|
+
value: "both",
|
|
30992
|
+
checked: method === "both",
|
|
30993
|
+
onChange: (e2) => setMethod(e2.target.value),
|
|
30994
|
+
style: {
|
|
30995
|
+
marginTop: "4px",
|
|
30996
|
+
cursor: "pointer"
|
|
30997
|
+
}
|
|
30998
|
+
}
|
|
30999
|
+
),
|
|
31000
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
31001
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "neutral800", fontWeight: "semiBold", children: formatMessage({
|
|
31002
|
+
id: `${index.PLUGIN_ID}.settings.loginRegister.method.both`,
|
|
31003
|
+
defaultMessage: "Both Methods (Unified)"
|
|
31004
|
+
}) }),
|
|
31005
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", marginTop: 1, display: "block", children: formatMessage({
|
|
31006
|
+
id: `${index.PLUGIN_ID}.settings.loginRegister.method.both.description`,
|
|
31007
|
+
defaultMessage: "Users can choose between OTP or email/password authentication. Use the unified /auth/unified endpoint to support both methods simultaneously."
|
|
31008
|
+
}) })
|
|
31009
|
+
] })
|
|
31010
|
+
] })
|
|
31011
|
+
}
|
|
30882
31012
|
)
|
|
30883
31013
|
] }) }),
|
|
30884
31014
|
error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 4, padding: 3, background: "danger100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "danger700", children: error }) }),
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import React__default, { useContext, useRef, useCallback, useDebugValue, useMemo, useState, useEffect, useLayoutEffect, createContext as createContext$1, createElement, useReducer } from "react";
|
|
4
4
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
5
|
import { Flex, Box, Popover, Typography, Button, LinkButton, Link as Link$1, Portal, Alert, Field, SubNav, Badge, TextInput, Pagination, PreviousLink, Dots, PageLink, NextLink, Modal, Main } from "@strapi/design-system";
|
|
6
|
-
import { P as PLUGIN_ID } from "./index-
|
|
6
|
+
import { P as PLUGIN_ID } from "./index-CXGrFKp6.mjs";
|
|
7
7
|
import { WarningCircle, CaretDown, Trash } from "@strapi/icons";
|
|
8
8
|
import "react-dom/client";
|
|
9
9
|
import ReactDOM, { unstable_batchedUpdates as unstable_batchedUpdates$1 } from "react-dom";
|
|
@@ -26465,6 +26465,97 @@ const ApiCollectionsContent = () => {
|
|
|
26465
26465
|
"email": "user@example.com",
|
|
26466
26466
|
"otp": "123456",
|
|
26467
26467
|
"type": "email"
|
|
26468
|
+
}`
|
|
26469
|
+
},
|
|
26470
|
+
{
|
|
26471
|
+
id: "auth-method",
|
|
26472
|
+
method: "GET",
|
|
26473
|
+
path: getApiPath("/api/webbycommerce/auth/method"),
|
|
26474
|
+
title: formatMessage({
|
|
26475
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.title`,
|
|
26476
|
+
defaultMessage: "Get Authentication Method"
|
|
26477
|
+
}),
|
|
26478
|
+
summary: formatMessage({
|
|
26479
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.summary`,
|
|
26480
|
+
defaultMessage: "Get the current authentication method (default or otp) configured in the plugin settings. Use this endpoint in your frontend to determine which authentication flow to display."
|
|
26481
|
+
}),
|
|
26482
|
+
auth: formatMessage({
|
|
26483
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.auth`,
|
|
26484
|
+
defaultMessage: "Auth: public (no authentication required)."
|
|
26485
|
+
}),
|
|
26486
|
+
response: `{
|
|
26487
|
+
"method": "default",
|
|
26488
|
+
"message": "Current authentication method: default"
|
|
26489
|
+
}`,
|
|
26490
|
+
usage: [
|
|
26491
|
+
formatMessage({
|
|
26492
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.usage.frontend`,
|
|
26493
|
+
defaultMessage: "Call this endpoint on app initialization to determine which auth UI to show."
|
|
26494
|
+
}),
|
|
26495
|
+
formatMessage({
|
|
26496
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.usage.conditional`,
|
|
26497
|
+
defaultMessage: 'If method is "otp", show OTP login/register form. If "default", show email/password form.'
|
|
26498
|
+
}),
|
|
26499
|
+
formatMessage({
|
|
26500
|
+
id: `${PLUGIN_ID}.settings.apiCollections.authMethod.usage.dynamic`,
|
|
26501
|
+
defaultMessage: "Method can change based on plugin settings, so check this endpoint periodically."
|
|
26502
|
+
})
|
|
26503
|
+
],
|
|
26504
|
+
getCurl: () => `curl http://localhost:1337${getApiPath("/api/webbycommerce/auth/method")}`
|
|
26505
|
+
},
|
|
26506
|
+
{
|
|
26507
|
+
id: "unified-auth",
|
|
26508
|
+
method: "POST",
|
|
26509
|
+
path: getApiPath("/api/webbycommerce/auth/unified"),
|
|
26510
|
+
title: formatMessage({
|
|
26511
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.title`,
|
|
26512
|
+
defaultMessage: "Unified Authentication"
|
|
26513
|
+
}),
|
|
26514
|
+
summary: formatMessage({
|
|
26515
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.summary`,
|
|
26516
|
+
defaultMessage: "Unified authentication endpoint that supports both OTP and default (email/password) methods. Automatically detects which method to use based on request body. Perfect for frontends that want to support both authentication methods simultaneously."
|
|
26517
|
+
}),
|
|
26518
|
+
auth: formatMessage({
|
|
26519
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.auth`,
|
|
26520
|
+
defaultMessage: "Auth: public (no authentication required)."
|
|
26521
|
+
}),
|
|
26522
|
+
response: `{
|
|
26523
|
+
"success": true,
|
|
26524
|
+
"step": "login",
|
|
26525
|
+
"method": "default",
|
|
26526
|
+
"message": "Login successfully!",
|
|
26527
|
+
"jwt": "eyJhbGciOi...",
|
|
26528
|
+
"user": {
|
|
26529
|
+
"id": 1,
|
|
26530
|
+
"username": "user1234",
|
|
26531
|
+
"email": "user@example.com"
|
|
26532
|
+
}
|
|
26533
|
+
}`,
|
|
26534
|
+
usage: [
|
|
26535
|
+
formatMessage({
|
|
26536
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.unified`,
|
|
26537
|
+
defaultMessage: "Use this single endpoint for all authentication needs - OTP and default methods."
|
|
26538
|
+
}),
|
|
26539
|
+
formatMessage({
|
|
26540
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.otp`,
|
|
26541
|
+
defaultMessage: 'For OTP: First call with step="request" and email/mobile, then call with step="verify" and OTP code.'
|
|
26542
|
+
}),
|
|
26543
|
+
formatMessage({
|
|
26544
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.default`,
|
|
26545
|
+
defaultMessage: 'For default: Call with step="login" and identifier/password, or step="register" with username/email/password.'
|
|
26546
|
+
}),
|
|
26547
|
+
formatMessage({
|
|
26548
|
+
id: `${PLUGIN_ID}.settings.apiCollections.unifiedAuth.usage.auto`,
|
|
26549
|
+
defaultMessage: 'Method is auto-detected from request body, or specify authMethod="otp" or "default" explicitly.'
|
|
26550
|
+
})
|
|
26551
|
+
],
|
|
26552
|
+
getCurl: () => `curl -X POST http://localhost:1337${getApiPath("/api/webbycommerce/auth/unified")} \\
|
|
26553
|
+
-H "Content-Type: application/json" \\
|
|
26554
|
+
-d '{"step": "login", "identifier": "user@example.com", "password": "password"}'`,
|
|
26555
|
+
requestBody: `{
|
|
26556
|
+
"step": "login",
|
|
26557
|
+
"identifier": "user@example.com",
|
|
26558
|
+
"password": "password"
|
|
26468
26559
|
}`
|
|
26469
26560
|
},
|
|
26470
26561
|
{
|
|
@@ -30858,6 +30949,45 @@ const LoginRegisterContent = () => {
|
|
|
30858
30949
|
] })
|
|
30859
30950
|
] })
|
|
30860
30951
|
}
|
|
30952
|
+
),
|
|
30953
|
+
/* @__PURE__ */ jsx(
|
|
30954
|
+
Box,
|
|
30955
|
+
{
|
|
30956
|
+
as: "label",
|
|
30957
|
+
padding: 3,
|
|
30958
|
+
background: method === "both" ? "primary100" : "neutral0",
|
|
30959
|
+
hasRadius: true,
|
|
30960
|
+
style: {
|
|
30961
|
+
cursor: "pointer",
|
|
30962
|
+
border: `1px solid ${method === "both" ? "#4945ff" : "#dcdce4"}`
|
|
30963
|
+
},
|
|
30964
|
+
children: /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "flex-start", children: [
|
|
30965
|
+
/* @__PURE__ */ jsx(
|
|
30966
|
+
"input",
|
|
30967
|
+
{
|
|
30968
|
+
type: "radio",
|
|
30969
|
+
name: "loginMethod",
|
|
30970
|
+
value: "both",
|
|
30971
|
+
checked: method === "both",
|
|
30972
|
+
onChange: (e2) => setMethod(e2.target.value),
|
|
30973
|
+
style: {
|
|
30974
|
+
marginTop: "4px",
|
|
30975
|
+
cursor: "pointer"
|
|
30976
|
+
}
|
|
30977
|
+
}
|
|
30978
|
+
),
|
|
30979
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
30980
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "neutral800", fontWeight: "semiBold", children: formatMessage({
|
|
30981
|
+
id: `${PLUGIN_ID}.settings.loginRegister.method.both`,
|
|
30982
|
+
defaultMessage: "Both Methods (Unified)"
|
|
30983
|
+
}) }),
|
|
30984
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", marginTop: 1, display: "block", children: formatMessage({
|
|
30985
|
+
id: `${PLUGIN_ID}.settings.loginRegister.method.both.description`,
|
|
30986
|
+
defaultMessage: "Users can choose between OTP or email/password authentication. Use the unified /auth/unified endpoint to support both methods simultaneously."
|
|
30987
|
+
}) })
|
|
30988
|
+
] })
|
|
30989
|
+
] })
|
|
30990
|
+
}
|
|
30861
30991
|
)
|
|
30862
30992
|
] }) }),
|
|
30863
30993
|
error && /* @__PURE__ */ jsx(Box, { marginTop: 4, padding: 3, background: "danger100", hasRadius: true, children: /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "danger700", children: error }) }),
|
|
@@ -88,6 +88,19 @@ const en = {
|
|
|
88
88
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.verify": "Submit the OTP code received via email or SMS.",
|
|
89
89
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.token": "Receive a JWT token for authenticated API requests.",
|
|
90
90
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.store": "Store the JWT token securely and include it in subsequent requests.",
|
|
91
|
+
"webbycommerce.settings.apiCollections.authMethod.title": "Get Authentication Method",
|
|
92
|
+
"webbycommerce.settings.apiCollections.authMethod.summary": "Get the current authentication method (default or otp) configured in the plugin settings. Use this endpoint in your frontend to determine which authentication flow to display.",
|
|
93
|
+
"webbycommerce.settings.apiCollections.authMethod.auth": "Auth: public (no authentication required).",
|
|
94
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.frontend": "Call this endpoint on app initialization to determine which auth UI to show.",
|
|
95
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.conditional": 'If method is "otp", show OTP login/register form. If "default", show email/password form.',
|
|
96
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.dynamic": "Method can change based on plugin settings, so check this endpoint periodically.",
|
|
97
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.title": "Unified Authentication",
|
|
98
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.summary": "Unified authentication endpoint that supports both OTP and default (email/password) methods. Automatically detects which method to use based on request body. Perfect for frontends that want to support both authentication methods simultaneously.",
|
|
99
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.auth": "Auth: public (no authentication required).",
|
|
100
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.unified": "Use this single endpoint for all authentication needs - OTP and default methods.",
|
|
101
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.otp": 'For OTP: First call with step="request" and email/mobile, then call with step="verify" and OTP code.',
|
|
102
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.default": 'For default: Call with step="login" and identifier/password, or step="register" with username/email/password.',
|
|
103
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.auto": 'Method is auto-detected from request body, or specify authMethod="otp" or "default" explicitly.',
|
|
91
104
|
"webbycommerce.settings.apiCollections.defaultLogin.title": "Default Login (Email/Password)",
|
|
92
105
|
"webbycommerce.settings.apiCollections.defaultLogin.summary": "Use Strapi's built-in /auth/local endpoint for email/password login when the authentication method is set to Default.",
|
|
93
106
|
"webbycommerce.settings.apiCollections.defaultLogin.auth": "Auth: public (uses Strapi's core Users & Permissions authentication).",
|
|
@@ -130,6 +143,8 @@ const en = {
|
|
|
130
143
|
"webbycommerce.settings.loginRegister.method.default.description": "Uses Strapi's built-in authentication system with email and password.",
|
|
131
144
|
"webbycommerce.settings.loginRegister.method.otp": "OTP (Email/Mobile Verification)",
|
|
132
145
|
"webbycommerce.settings.loginRegister.method.otp.description": "Users can login or register using email or mobile number. An OTP (One-Time Password) will be sent for verification.",
|
|
146
|
+
"webbycommerce.settings.loginRegister.method.both": "Both Methods (Unified)",
|
|
147
|
+
"webbycommerce.settings.loginRegister.method.both.description": "Users can choose between OTP or email/password authentication. Use the unified /auth/unified endpoint to support both methods simultaneously.",
|
|
133
148
|
"webbycommerce.settings.loginRegister.save": "Save settings",
|
|
134
149
|
"webbycommerce.settings.loginRegister.save.success": "Settings updated successfully.",
|
|
135
150
|
"webbycommerce.settings.loginRegister.save.error": "Failed to save settings.",
|
|
@@ -86,6 +86,19 @@ const en = {
|
|
|
86
86
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.verify": "Submit the OTP code received via email or SMS.",
|
|
87
87
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.token": "Receive a JWT token for authenticated API requests.",
|
|
88
88
|
"webbycommerce.settings.apiCollections.verifyOtp.usage.store": "Store the JWT token securely and include it in subsequent requests.",
|
|
89
|
+
"webbycommerce.settings.apiCollections.authMethod.title": "Get Authentication Method",
|
|
90
|
+
"webbycommerce.settings.apiCollections.authMethod.summary": "Get the current authentication method (default or otp) configured in the plugin settings. Use this endpoint in your frontend to determine which authentication flow to display.",
|
|
91
|
+
"webbycommerce.settings.apiCollections.authMethod.auth": "Auth: public (no authentication required).",
|
|
92
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.frontend": "Call this endpoint on app initialization to determine which auth UI to show.",
|
|
93
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.conditional": 'If method is "otp", show OTP login/register form. If "default", show email/password form.',
|
|
94
|
+
"webbycommerce.settings.apiCollections.authMethod.usage.dynamic": "Method can change based on plugin settings, so check this endpoint periodically.",
|
|
95
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.title": "Unified Authentication",
|
|
96
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.summary": "Unified authentication endpoint that supports both OTP and default (email/password) methods. Automatically detects which method to use based on request body. Perfect for frontends that want to support both authentication methods simultaneously.",
|
|
97
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.auth": "Auth: public (no authentication required).",
|
|
98
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.unified": "Use this single endpoint for all authentication needs - OTP and default methods.",
|
|
99
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.otp": 'For OTP: First call with step="request" and email/mobile, then call with step="verify" and OTP code.',
|
|
100
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.default": 'For default: Call with step="login" and identifier/password, or step="register" with username/email/password.',
|
|
101
|
+
"webbycommerce.settings.apiCollections.unifiedAuth.usage.auto": 'Method is auto-detected from request body, or specify authMethod="otp" or "default" explicitly.',
|
|
89
102
|
"webbycommerce.settings.apiCollections.defaultLogin.title": "Default Login (Email/Password)",
|
|
90
103
|
"webbycommerce.settings.apiCollections.defaultLogin.summary": "Use Strapi's built-in /auth/local endpoint for email/password login when the authentication method is set to Default.",
|
|
91
104
|
"webbycommerce.settings.apiCollections.defaultLogin.auth": "Auth: public (uses Strapi's core Users & Permissions authentication).",
|
|
@@ -128,6 +141,8 @@ const en = {
|
|
|
128
141
|
"webbycommerce.settings.loginRegister.method.default.description": "Uses Strapi's built-in authentication system with email and password.",
|
|
129
142
|
"webbycommerce.settings.loginRegister.method.otp": "OTP (Email/Mobile Verification)",
|
|
130
143
|
"webbycommerce.settings.loginRegister.method.otp.description": "Users can login or register using email or mobile number. An OTP (One-Time Password) will be sent for verification.",
|
|
144
|
+
"webbycommerce.settings.loginRegister.method.both": "Both Methods (Unified)",
|
|
145
|
+
"webbycommerce.settings.loginRegister.method.both.description": "Users can choose between OTP or email/password authentication. Use the unified /auth/unified endpoint to support both methods simultaneously.",
|
|
131
146
|
"webbycommerce.settings.loginRegister.save": "Save settings",
|
|
132
147
|
"webbycommerce.settings.loginRegister.save.success": "Settings updated successfully.",
|
|
133
148
|
"webbycommerce.settings.loginRegister.save.error": "Failed to save settings.",
|
|
@@ -92,7 +92,7 @@ const index = {
|
|
|
92
92
|
defaultMessage: "Configure"
|
|
93
93
|
},
|
|
94
94
|
to: `${PLUGIN_ID}`,
|
|
95
|
-
Component: () => import("./Settings-
|
|
95
|
+
Component: () => import("./Settings-yLx-YvVy.mjs")
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
},
|
|
@@ -106,14 +106,14 @@ const index = {
|
|
|
106
106
|
locales.map(async (locale) => {
|
|
107
107
|
if (locale === "en") {
|
|
108
108
|
try {
|
|
109
|
-
const { default: data } = await import("./en-
|
|
109
|
+
const { default: data } = await import("./en-DE15m4xZ.mjs");
|
|
110
110
|
return { data, locale };
|
|
111
111
|
} catch {
|
|
112
112
|
return { data: {}, locale };
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
try {
|
|
116
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-
|
|
116
|
+
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-DE15m4xZ.mjs") }), `./translations/${locale}.json`, 3);
|
|
117
117
|
return { data, locale };
|
|
118
118
|
} catch {
|
|
119
119
|
return { data: {}, locale };
|
|
@@ -93,7 +93,7 @@ const index = {
|
|
|
93
93
|
defaultMessage: "Configure"
|
|
94
94
|
},
|
|
95
95
|
to: `${PLUGIN_ID}`,
|
|
96
|
-
Component: () => Promise.resolve().then(() => require("./Settings-
|
|
96
|
+
Component: () => Promise.resolve().then(() => require("./Settings-DZXAkI24.js"))
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
99
|
},
|
|
@@ -107,14 +107,14 @@ const index = {
|
|
|
107
107
|
locales.map(async (locale) => {
|
|
108
108
|
if (locale === "en") {
|
|
109
109
|
try {
|
|
110
|
-
const { default: data } = await Promise.resolve().then(() => require("./en-
|
|
110
|
+
const { default: data } = await Promise.resolve().then(() => require("./en-CiQ97iC8.js"));
|
|
111
111
|
return { data, locale };
|
|
112
112
|
} catch {
|
|
113
113
|
return { data: {}, locale };
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
try {
|
|
117
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-
|
|
117
|
+
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-CiQ97iC8.js")) }), `./translations/${locale}.json`, 3);
|
|
118
118
|
return { data, locale };
|
|
119
119
|
} catch {
|
|
120
120
|
return { data: {}, locale };
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED