@vivinkv28/strapi-2fa-admin-plugin 0.1.14 → 0.1.15
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
CHANGED
|
@@ -10,6 +10,20 @@ This package adds the backend flow for:
|
|
|
10
10
|
- rate limiting for login, verify, and resend
|
|
11
11
|
- final Strapi admin session creation only after OTP verification
|
|
12
12
|
|
|
13
|
+
## UI Preview
|
|
14
|
+
|
|
15
|
+
### Login Screen
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
The first step collects the admin email and password before starting the OTP challenge flow.
|
|
20
|
+
|
|
21
|
+
### OTP Screen
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
The second step shows the OTP input, resend action, and inline validation feedback during verification.
|
|
26
|
+
|
|
13
27
|
## Important
|
|
14
28
|
|
|
15
29
|
This package does not automatically replace the default Strapi admin login UI.
|
|
@@ -226,17 +226,18 @@ const OtpField = ()=>{
|
|
|
226
226
|
}, index))
|
|
227
227
|
})
|
|
228
228
|
}),
|
|
229
|
-
errors.code ? /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
|
|
230
|
-
paddingTop: 3,
|
|
231
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
|
|
232
|
-
id: "otp-code-error",
|
|
233
|
-
variant: "pi",
|
|
234
|
-
textColor: "danger600",
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
229
|
+
errors.code ? /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
|
|
230
|
+
paddingTop: 3,
|
|
231
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
|
|
232
|
+
id: "otp-code-error",
|
|
233
|
+
variant: "pi",
|
|
234
|
+
textColor: "danger600",
|
|
235
|
+
textAlign: "center",
|
|
236
|
+
children: errors.code
|
|
237
|
+
})
|
|
238
|
+
}) : null
|
|
239
|
+
]
|
|
240
|
+
});
|
|
240
241
|
};
|
|
241
242
|
const Login = ({ children })=>{
|
|
242
243
|
const [apiError, setApiError] = React__namespace.useState();
|
|
@@ -204,17 +204,18 @@ const OtpField = ()=>{
|
|
|
204
204
|
}, index))
|
|
205
205
|
})
|
|
206
206
|
}),
|
|
207
|
-
errors.code ? /*#__PURE__*/ jsx(Box, {
|
|
208
|
-
paddingTop: 3,
|
|
209
|
-
children: /*#__PURE__*/ jsx(Typography, {
|
|
210
|
-
id: "otp-code-error",
|
|
211
|
-
variant: "pi",
|
|
212
|
-
textColor: "danger600",
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
errors.code ? /*#__PURE__*/ jsx(Box, {
|
|
208
|
+
paddingTop: 3,
|
|
209
|
+
children: /*#__PURE__*/ jsx(Typography, {
|
|
210
|
+
id: "otp-code-error",
|
|
211
|
+
variant: "pi",
|
|
212
|
+
textColor: "danger600",
|
|
213
|
+
textAlign: "center",
|
|
214
|
+
children: errors.code
|
|
215
|
+
})
|
|
216
|
+
}) : null
|
|
217
|
+
]
|
|
218
|
+
});
|
|
218
219
|
};
|
|
219
220
|
const Login = ({ children })=>{
|
|
220
221
|
const [apiError, setApiError] = React.useState();
|