@arch-cadre/auth 1.0.6 → 1.0.7
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/dist/ui/forgot-password/components.cjs +2 -2
- package/dist/ui/forgot-password/components.mjs +1 -1
- package/dist/ui/reset-password/components.cjs +2 -2
- package/dist/ui/reset-password/components.mjs +1 -1
- package/dist/ui/reset-password/verify-email/components.cjs +2 -2
- package/dist/ui/reset-password/verify-email/components.mjs +1 -1
- package/dist/ui/signin/components.cjs +2 -2
- package/dist/ui/signin/components.mjs +1 -1
- package/dist/ui/signin/page.cjs +3 -3
- package/dist/ui/signin/page.mjs +1 -1
- package/dist/ui/signup/components.cjs +2 -2
- package/dist/ui/signup/components.mjs +1 -1
- package/dist/ui/signup/page.cjs +4 -4
- package/dist/ui/signup/page.mjs +2 -2
- package/dist/ui/verify-email/components.cjs +3 -3
- package/dist/ui/verify-email/components.mjs +1 -1
- package/package.json +7 -7
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ForgotPasswordForm = ForgotPasswordForm;
|
|
8
|
-
var
|
|
8
|
+
var _intl = require("@arch-cadre/intl");
|
|
9
9
|
var _button = require("@arch-cadre/ui/components/button");
|
|
10
10
|
var _field = require("@arch-cadre/ui/components/field");
|
|
11
11
|
var _input = require("@arch-cadre/ui/components/input");
|
|
@@ -26,7 +26,7 @@ function ForgotPasswordForm() {
|
|
|
26
26
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0,
|
|
29
|
+
} = (0, _intl.useTranslation)();
|
|
30
30
|
const form = (0, _reactHookForm.useForm)({
|
|
31
31
|
resolver: (0, _zod.zodResolver)(_validation.forgotPasswordSchema)
|
|
32
32
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useTranslation } from "@arch-cadre/intl
|
|
2
|
+
import { useTranslation } from "@arch-cadre/intl";
|
|
3
3
|
import { Button } from "@arch-cadre/ui/components/button";
|
|
4
4
|
import { Field, FieldError, FieldGroup } from "@arch-cadre/ui/components/field";
|
|
5
5
|
import { Input } from "@arch-cadre/ui/components/input";
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ResetPasswordForm = ResetPasswordForm;
|
|
8
|
-
var
|
|
8
|
+
var _intl = require("@arch-cadre/intl");
|
|
9
9
|
var _button = require("@arch-cadre/ui/components/button");
|
|
10
10
|
var _card = require("@arch-cadre/ui/components/card");
|
|
11
11
|
var _field = require("@arch-cadre/ui/components/field");
|
|
@@ -27,7 +27,7 @@ function ResetPasswordForm() {
|
|
|
27
27
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
28
28
|
const {
|
|
29
29
|
t
|
|
30
|
-
} = (0,
|
|
30
|
+
} = (0, _intl.useTranslation)();
|
|
31
31
|
const form = (0, _reactHookForm.useForm)({
|
|
32
32
|
resolver: (0, _zod.zodResolver)(_validation.resetPasswordSchema)
|
|
33
33
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.PasswordResetEmailVerificationForm = PasswordResetEmailVerificationForm;
|
|
8
|
-
var
|
|
8
|
+
var _intl = require("@arch-cadre/intl");
|
|
9
9
|
var _button = require("@arch-cadre/ui/components/button");
|
|
10
10
|
var _field = require("@arch-cadre/ui/components/field");
|
|
11
11
|
var _inputOtp = require("@arch-cadre/ui/components/input-otp");
|
|
@@ -27,7 +27,7 @@ function PasswordResetEmailVerificationForm({
|
|
|
27
27
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
28
28
|
const {
|
|
29
29
|
t
|
|
30
|
-
} = (0,
|
|
30
|
+
} = (0, _intl.useTranslation)();
|
|
31
31
|
const form = (0, _reactHookForm.useForm)({
|
|
32
32
|
resolver: (0, _zod.zodResolver)(_validation.verifyEmailSchema)
|
|
33
33
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.LoginForm = LoginForm;
|
|
8
8
|
exports.useLoginForm = useLoginForm;
|
|
9
|
-
var
|
|
9
|
+
var _intl = require("@arch-cadre/intl");
|
|
10
10
|
var _button = require("@arch-cadre/ui/components/button");
|
|
11
11
|
var _checkbox = require("@arch-cadre/ui/components/checkbox");
|
|
12
12
|
var _field = require("@arch-cadre/ui/components/field");
|
|
@@ -42,7 +42,7 @@ function LoginForm({
|
|
|
42
42
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
43
43
|
const {
|
|
44
44
|
t
|
|
45
|
-
} = (0,
|
|
45
|
+
} = (0, _intl.useTranslation)();
|
|
46
46
|
const form = (0, _reactHookForm.useForm)({
|
|
47
47
|
resolver: (0, _zod.zodResolver)(_validation.loginSchema)
|
|
48
48
|
});
|
package/dist/ui/signin/page.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
module.exports = Page;
|
|
7
7
|
var _server = require("@arch-cadre/core/server");
|
|
8
|
-
var
|
|
8
|
+
var _modules = require("@arch-cadre/modules");
|
|
9
9
|
var _server2 = require("@arch-cadre/modules/server");
|
|
10
10
|
var _navigation = require("next/navigation");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -27,12 +27,12 @@ async function Page() {
|
|
|
27
27
|
const hasAllowed = await (0, _server2.hasExtension)("auth", "signin:extra-buttons");
|
|
28
28
|
return /* @__PURE__ */React.createElement(_components.LoginForm, {
|
|
29
29
|
hasAllowedExtensions: hasAllowed,
|
|
30
|
-
extraButtons: /* @__PURE__ */React.createElement(
|
|
30
|
+
extraButtons: /* @__PURE__ */React.createElement(_modules.ExtensionPoint, {
|
|
31
31
|
module: "auth",
|
|
32
32
|
point: "signin:extra-buttons",
|
|
33
33
|
className: "flex flex-col gap-2"
|
|
34
34
|
}),
|
|
35
|
-
extraFields: /* @__PURE__ */React.createElement(
|
|
35
|
+
extraFields: /* @__PURE__ */React.createElement(_modules.ExtensionPoint, {
|
|
36
36
|
module: "auth",
|
|
37
37
|
point: "signin:extra-fields",
|
|
38
38
|
className: "flex flex-col gap-4"
|
package/dist/ui/signin/page.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { checkSecurity, getCurrentSession } from "@arch-cadre/core/server";
|
|
2
|
-
import { ExtensionPoint } from "@arch-cadre/modules
|
|
2
|
+
import { ExtensionPoint } from "@arch-cadre/modules";
|
|
3
3
|
import { hasExtension } from "@arch-cadre/modules/server";
|
|
4
4
|
import { redirect } from "next/navigation";
|
|
5
5
|
import * as React from "react";
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SignUpForm = SignUpForm;
|
|
8
8
|
exports.useSignUpForm = useSignUpForm;
|
|
9
|
-
var
|
|
9
|
+
var _intl = require("@arch-cadre/intl");
|
|
10
10
|
var _button = require("@arch-cadre/ui/components/button");
|
|
11
11
|
var _checkbox = require("@arch-cadre/ui/components/checkbox");
|
|
12
12
|
var _field = require("@arch-cadre/ui/components/field");
|
|
@@ -42,7 +42,7 @@ function SignUpForm({
|
|
|
42
42
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
43
43
|
const {
|
|
44
44
|
t
|
|
45
|
-
} = (0,
|
|
45
|
+
} = (0, _intl.useTranslation)();
|
|
46
46
|
const form = (0, _reactHookForm.useForm)({
|
|
47
47
|
resolver: (0, _zod.zodResolver)(_validation.registerSchema)
|
|
48
48
|
});
|
package/dist/ui/signup/page.cjs
CHANGED
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
module.exports = Page;
|
|
7
7
|
var _server = require("@arch-cadre/core/server");
|
|
8
|
-
var
|
|
8
|
+
var _modules = require("@arch-cadre/modules");
|
|
9
|
+
var _server2 = require("@arch-cadre/modules/server");
|
|
9
10
|
var _navigation = require("next/navigation");
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _components = require("./components.cjs");
|
|
12
|
-
var _server2 = require("@arch-cadre/modules/server");
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
async function Page() {
|
|
@@ -23,12 +23,12 @@ async function Page() {
|
|
|
23
23
|
const hasAllowed = await (0, _server2.hasExtension)("auth", "signup:extra-buttons");
|
|
24
24
|
return /* @__PURE__ */React.createElement(_components.SignUpForm, {
|
|
25
25
|
hasAllowedExtraButtons: hasAllowed,
|
|
26
|
-
extraButtons: /* @__PURE__ */React.createElement(
|
|
26
|
+
extraButtons: /* @__PURE__ */React.createElement(_modules.ExtensionPoint, {
|
|
27
27
|
module: "auth",
|
|
28
28
|
point: "signup:extra-buttons",
|
|
29
29
|
className: "flex flex-col gap-2 mt-4"
|
|
30
30
|
}),
|
|
31
|
-
extraFields: /* @__PURE__ */React.createElement(
|
|
31
|
+
extraFields: /* @__PURE__ */React.createElement(_modules.ExtensionPoint, {
|
|
32
32
|
module: "auth",
|
|
33
33
|
point: "signup:extra-fields",
|
|
34
34
|
className: "flex flex-col gap-4"
|
package/dist/ui/signup/page.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getCurrentSession } from "@arch-cadre/core/server";
|
|
2
|
-
import { ExtensionPoint } from "@arch-cadre/modules
|
|
2
|
+
import { ExtensionPoint } from "@arch-cadre/modules";
|
|
3
|
+
import { hasExtension } from "@arch-cadre/modules/server";
|
|
3
4
|
import { redirect } from "next/navigation";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { SignUpForm } from "./components.mjs";
|
|
6
|
-
import { hasExtension } from "@arch-cadre/modules/server";
|
|
7
7
|
export default async function Page() {
|
|
8
8
|
const { session, user } = await getCurrentSession();
|
|
9
9
|
if (session !== null && user !== null) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.EmailVerificationForm = EmailVerificationForm;
|
|
8
8
|
exports.ResendEmailVerificationCodeForm = ResendEmailVerificationCodeForm;
|
|
9
|
-
var
|
|
9
|
+
var _intl = require("@arch-cadre/intl");
|
|
10
10
|
var _button = require("@arch-cadre/ui/components/button");
|
|
11
11
|
var _field = require("@arch-cadre/ui/components/field");
|
|
12
12
|
var _inputOtp = require("@arch-cadre/ui/components/input-otp");
|
|
@@ -27,7 +27,7 @@ function EmailVerificationForm({
|
|
|
27
27
|
const [generalError, setGeneralError] = (0, _react.useState)("");
|
|
28
28
|
const {
|
|
29
29
|
t
|
|
30
|
-
} = (0,
|
|
30
|
+
} = (0, _intl.useTranslation)();
|
|
31
31
|
const form = (0, _reactHookForm.useForm)({
|
|
32
32
|
resolver: (0, _zod.zodResolver)(_validation.verifyEmailSchema)
|
|
33
33
|
});
|
|
@@ -110,7 +110,7 @@ const resendEmailInitialState = {
|
|
|
110
110
|
function ResendEmailVerificationCodeForm() {
|
|
111
111
|
const {
|
|
112
112
|
t
|
|
113
|
-
} = (0,
|
|
113
|
+
} = (0, _intl.useTranslation)();
|
|
114
114
|
const [state, action, isPending] = (0, _react.useActionState)(_index.resendEmailVerificationCodeAction, resendEmailInitialState);
|
|
115
115
|
(0, _react.useEffect)(() => {
|
|
116
116
|
if (state.message) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useTranslation } from "@arch-cadre/intl
|
|
2
|
+
import { useTranslation } from "@arch-cadre/intl";
|
|
3
3
|
import { Button } from "@arch-cadre/ui/components/button";
|
|
4
4
|
import { Field, FieldError, FieldGroup } from "@arch-cadre/ui/components/field";
|
|
5
5
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arch-cadre/auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Auth module for Kryo framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"build": "unbuild"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@arch-cadre/modules": "^0.0.
|
|
34
|
-
"@arch-cadre/ui": "^0.0.
|
|
33
|
+
"@arch-cadre/modules": "^0.0.73",
|
|
34
|
+
"@arch-cadre/ui": "^0.0.47",
|
|
35
35
|
"@hookform/resolvers": "^3.10.0",
|
|
36
36
|
"lucide-react": "^0.475.0",
|
|
37
37
|
"react-hook-form": "^7.54.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"zod": "^3.24.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@arch-cadre/core": "^0.0.
|
|
42
|
+
"@arch-cadre/core": "^0.0.47",
|
|
43
43
|
"@types/react": "^19",
|
|
44
44
|
"next": "16.1.1",
|
|
45
45
|
"react": "^19.0.0",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"unbuild": "^3.6.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@arch-cadre/core": "^0.0.
|
|
51
|
-
"@arch-cadre/intl": "^0.0.
|
|
52
|
-
"@arch-cadre/ui": "^0.0.
|
|
50
|
+
"@arch-cadre/core": "^0.0.47",
|
|
51
|
+
"@arch-cadre/intl": "^0.0.47",
|
|
52
|
+
"@arch-cadre/ui": "^0.0.47",
|
|
53
53
|
"next": ">=13.0.0",
|
|
54
54
|
"react": "^19.0.0"
|
|
55
55
|
},
|