@arch-cadre/auth 1.0.9 → 1.0.10
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/actions/basic.d.ts +1 -1
- package/dist/actions/email.d.ts +1 -1
- package/dist/actions/index.cjs +2 -2
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/routes.cjs +7 -7
- package/dist/routes.mjs +7 -7
- package/dist/ui/forgot-password/components.cjs +2 -2
- package/dist/ui/forgot-password/components.mjs +2 -2
- package/dist/ui/forgot-password/page.cjs +1 -1
- package/dist/ui/forgot-password/page.mjs +1 -1
- package/dist/ui/reset-password/components.cjs +2 -2
- package/dist/ui/reset-password/components.mjs +2 -2
- package/dist/ui/reset-password/page.cjs +1 -1
- package/dist/ui/reset-password/page.mjs +1 -1
- package/dist/ui/reset-password/verify-email/components.cjs +2 -2
- package/dist/ui/reset-password/verify-email/components.mjs +2 -2
- package/dist/ui/reset-password/verify-email/page.cjs +1 -1
- package/dist/ui/reset-password/verify-email/page.mjs +1 -1
- package/dist/ui/signin/components.cjs +2 -2
- package/dist/ui/signin/components.d.ts +1 -1
- package/dist/ui/signin/components.mjs +2 -2
- package/dist/ui/signin/page.cjs +1 -1
- package/dist/ui/signin/page.mjs +1 -1
- package/dist/ui/signup/components.cjs +2 -2
- package/dist/ui/signup/components.d.ts +1 -1
- package/dist/ui/signup/components.mjs +2 -2
- package/dist/ui/signup/page.cjs +1 -1
- package/dist/ui/signup/page.mjs +1 -1
- package/dist/ui/verify-email/components.cjs +2 -2
- package/dist/ui/verify-email/components.mjs +2 -2
- package/dist/ui/verify-email/page.cjs +1 -1
- package/dist/ui/verify-email/page.mjs +1 -1
- package/package.json +7 -7
- package/src/actions/basic.ts +1 -1
- package/src/actions/email.ts +1 -1
- package/src/actions/index.ts +2 -2
- package/src/index.ts +1 -1
- package/src/routes.ts +7 -7
- package/src/ui/forgot-password/components.tsx +2 -2
- package/src/ui/forgot-password/page.tsx +1 -1
- package/src/ui/reset-password/components.tsx +2 -2
- package/src/ui/reset-password/page.tsx +1 -1
- package/src/ui/reset-password/verify-email/components.tsx +2 -2
- package/src/ui/reset-password/verify-email/page.tsx +1 -1
- package/src/ui/signin/components.tsx +2 -2
- package/src/ui/signin/page.tsx +1 -1
- package/src/ui/signup/components.tsx +2 -2
- package/src/ui/signup/page.tsx +1 -1
- package/src/ui/verify-email/components.tsx +2 -2
- package/src/ui/verify-email/page.tsx +1 -1
package/dist/actions/basic.d.ts
CHANGED
package/dist/actions/email.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ForgotPasswordInput, ResetPasswordInput, VerifyEmailInput } from "@arch-cadre/core";
|
|
2
|
-
import type { ActionResult } from "../types
|
|
2
|
+
import type { ActionResult } from "../types";
|
|
3
3
|
export declare function forgotPasswordAction(data: ForgotPasswordInput): Promise<ActionResult>;
|
|
4
4
|
export declare function verifyPasswordResetEmailAction(data: VerifyEmailInput): Promise<ActionResult>;
|
|
5
5
|
export declare function verifyEmailAction(data: VerifyEmailInput): Promise<ActionResult>;
|
package/dist/actions/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _basic = require("./basic.
|
|
6
|
+
var _basic = require("./basic.cjs");
|
|
7
7
|
Object.keys(_basic).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
9
|
if (key in exports && exports[key] === _basic[key]) return;
|
|
@@ -14,7 +14,7 @@ Object.keys(_basic).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _email = require("./email.
|
|
17
|
+
var _email = require("./email.cjs");
|
|
18
18
|
Object.keys(_email).forEach(function (key) {
|
|
19
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
20
|
if (key in exports && exports[key] === _email[key]) return;
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./basic
|
|
2
|
-
export * from "./email
|
|
1
|
+
export * from "./basic";
|
|
2
|
+
export * from "./email";
|
package/dist/actions/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./basic.
|
|
2
|
-
export * from "./email.
|
|
1
|
+
export * from "./basic.mjs";
|
|
2
|
+
export * from "./email.mjs";
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
var _manifest = _interopRequireDefault(require("../manifest.json"));
|
|
8
|
-
var _routes = require("./routes.
|
|
8
|
+
var _routes = require("./routes.cjs");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
const authModule = {
|
|
11
11
|
manifest: _manifest.default,
|
package/dist/index.mjs
CHANGED
package/dist/routes.cjs
CHANGED
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.publicRoutes = void 0;
|
|
7
7
|
var _dynamic = _interopRequireDefault(require("next/dynamic"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const AuthLayout = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/layout.
|
|
10
|
-
const SignInPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/signin/page.
|
|
11
|
-
const SignUpPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/signup/page.
|
|
12
|
-
const ForgotPasswordPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/forgot-password/page.
|
|
13
|
-
const ResetPasswordPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/reset-password/page.
|
|
14
|
-
const VerifyEmailPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/verify-email/page.
|
|
15
|
-
const ResetPasswordVerifyEmailPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/reset-password/verify-email/page.
|
|
9
|
+
const AuthLayout = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/layout.cjs")));
|
|
10
|
+
const SignInPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/signin/page.cjs")));
|
|
11
|
+
const SignUpPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/signup/page.cjs")));
|
|
12
|
+
const ForgotPasswordPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/forgot-password/page.cjs")));
|
|
13
|
+
const ResetPasswordPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/reset-password/page.cjs")));
|
|
14
|
+
const VerifyEmailPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/verify-email/page.cjs")));
|
|
15
|
+
const ResetPasswordVerifyEmailPage = (0, _dynamic.default)(() => Promise.resolve().then(() => require("./ui/reset-password/verify-email/page.cjs")));
|
|
16
16
|
const publicRoutes = exports.publicRoutes = [{
|
|
17
17
|
path: "/signin",
|
|
18
18
|
component: SignInPage,
|
package/dist/routes.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import dynamic from "next/dynamic";
|
|
2
|
-
const AuthLayout = dynamic(() => import("./ui/layout.
|
|
3
|
-
const SignInPage = dynamic(() => import("./ui/signin/page.
|
|
4
|
-
const SignUpPage = dynamic(() => import("./ui/signup/page.
|
|
5
|
-
const ForgotPasswordPage = dynamic(() => import("./ui/forgot-password/page.
|
|
6
|
-
const ResetPasswordPage = dynamic(() => import("./ui/reset-password/page.
|
|
7
|
-
const VerifyEmailPage = dynamic(() => import("./ui/verify-email/page.
|
|
2
|
+
const AuthLayout = dynamic(() => import("./ui/layout.mjs"));
|
|
3
|
+
const SignInPage = dynamic(() => import("./ui/signin/page.mjs"));
|
|
4
|
+
const SignUpPage = dynamic(() => import("./ui/signup/page.mjs"));
|
|
5
|
+
const ForgotPasswordPage = dynamic(() => import("./ui/forgot-password/page.mjs"));
|
|
6
|
+
const ResetPasswordPage = dynamic(() => import("./ui/reset-password/page.mjs"));
|
|
7
|
+
const VerifyEmailPage = dynamic(() => import("./ui/verify-email/page.mjs"));
|
|
8
8
|
const ResetPasswordVerifyEmailPage = dynamic(
|
|
9
|
-
() => import("./ui/reset-password/verify-email/page.
|
|
9
|
+
() => import("./ui/reset-password/verify-email/page.mjs")
|
|
10
10
|
);
|
|
11
11
|
export const publicRoutes = [
|
|
12
12
|
{
|
|
@@ -18,8 +18,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
18
18
|
var React = _react;
|
|
19
19
|
var _reactHookForm = require("react-hook-form");
|
|
20
20
|
var _sonner = require("sonner");
|
|
21
|
-
var _index = require("../../actions/index.
|
|
22
|
-
var _validation = require("../../validation.
|
|
21
|
+
var _index = require("../../actions/index.cjs");
|
|
22
|
+
var _validation = require("../../validation.cjs");
|
|
23
23
|
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); }
|
|
24
24
|
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; }
|
|
25
25
|
function ForgotPasswordForm() {
|
|
@@ -12,10 +12,10 @@ import * as React from "react";
|
|
|
12
12
|
import { useState } from "react";
|
|
13
13
|
import { Controller, useForm } from "react-hook-form";
|
|
14
14
|
import { toast } from "sonner";
|
|
15
|
-
import { forgotPasswordAction } from "../../actions/index.
|
|
15
|
+
import { forgotPasswordAction } from "../../actions/index.mjs";
|
|
16
16
|
import {
|
|
17
17
|
forgotPasswordSchema
|
|
18
|
-
} from "../../validation.
|
|
18
|
+
} from "../../validation.mjs";
|
|
19
19
|
export function ForgotPasswordForm() {
|
|
20
20
|
const [generalError, setGeneralError] = useState("");
|
|
21
21
|
const { t } = useTranslation();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
module.exports = Page;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _components = require("./components.
|
|
8
|
+
var _components = require("./components.cjs");
|
|
9
9
|
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); }
|
|
10
10
|
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; }
|
|
11
11
|
async function Page() {
|
|
@@ -19,8 +19,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
var React = _react;
|
|
20
20
|
var _reactHookForm = require("react-hook-form");
|
|
21
21
|
var _sonner = require("sonner");
|
|
22
|
-
var _index = require("../../actions/index.
|
|
23
|
-
var _validation = require("../../validation.
|
|
22
|
+
var _index = require("../../actions/index.cjs");
|
|
23
|
+
var _validation = require("../../validation.cjs");
|
|
24
24
|
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); }
|
|
25
25
|
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; }
|
|
26
26
|
function ResetPasswordForm() {
|
|
@@ -21,8 +21,8 @@ import * as React from "react";
|
|
|
21
21
|
import { useState } from "react";
|
|
22
22
|
import { Controller, useForm } from "react-hook-form";
|
|
23
23
|
import { toast } from "sonner";
|
|
24
|
-
import { resetPasswordAction } from "../../actions/index.
|
|
25
|
-
import { resetPasswordSchema } from "../../validation.
|
|
24
|
+
import { resetPasswordAction } from "../../actions/index.mjs";
|
|
25
|
+
import { resetPasswordSchema } from "../../validation.mjs";
|
|
26
26
|
export function ResetPasswordForm() {
|
|
27
27
|
const [generalError, setGeneralError] = useState("");
|
|
28
28
|
const { t } = useTranslation();
|
|
@@ -7,7 +7,7 @@ module.exports = Page;
|
|
|
7
7
|
var _server = require("@arch-cadre/core/server");
|
|
8
8
|
var _navigation = require("next/navigation");
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _components = require("./components.
|
|
10
|
+
var _components = require("./components.cjs");
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
13
|
async function Page() {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "@arch-cadre/core/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { ResetPasswordForm } from "./components.
|
|
7
|
+
import { ResetPasswordForm } from "./components.mjs";
|
|
8
8
|
export default async function Page() {
|
|
9
9
|
const { session, user } = await getCurrentPasswordResetSession();
|
|
10
10
|
if (session === null || user === null) {
|
|
@@ -17,8 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var React = _react;
|
|
18
18
|
var _reactHookForm = require("react-hook-form");
|
|
19
19
|
var _sonner = require("sonner");
|
|
20
|
-
var _index = require("../../../actions/index.
|
|
21
|
-
var _validation = require("../../../validation.
|
|
20
|
+
var _index = require("../../../actions/index.cjs");
|
|
21
|
+
var _validation = require("../../../validation.cjs");
|
|
22
22
|
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); }
|
|
23
23
|
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; }
|
|
24
24
|
function PasswordResetEmailVerificationForm({
|
|
@@ -19,8 +19,8 @@ import * as React from "react";
|
|
|
19
19
|
import { useState } from "react";
|
|
20
20
|
import { Controller, useForm } from "react-hook-form";
|
|
21
21
|
import { toast } from "sonner";
|
|
22
|
-
import { verifyPasswordResetEmailAction } from "../../../actions/index.
|
|
23
|
-
import { verifyEmailSchema } from "../../../validation.
|
|
22
|
+
import { verifyPasswordResetEmailAction } from "../../../actions/index.mjs";
|
|
23
|
+
import { verifyEmailSchema } from "../../../validation.mjs";
|
|
24
24
|
export function PasswordResetEmailVerificationForm({ email = "" }) {
|
|
25
25
|
const [generalError, setGeneralError] = useState("");
|
|
26
26
|
const { t } = useTranslation();
|
|
@@ -7,7 +7,7 @@ module.exports = Page;
|
|
|
7
7
|
var _server = require("@arch-cadre/core/server");
|
|
8
8
|
var _navigation = require("next/navigation");
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _components = require("./components.
|
|
10
|
+
var _components = require("./components.cjs");
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
13
|
async function Page() {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "@arch-cadre/core/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { PasswordResetEmailVerificationForm } from "./components.
|
|
7
|
+
import { PasswordResetEmailVerificationForm } from "./components.mjs";
|
|
8
8
|
export default async function Page() {
|
|
9
9
|
const { session, user } = await getCurrentPasswordResetSession();
|
|
10
10
|
if (session === null || user === null) {
|
|
@@ -21,8 +21,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
var React = _react;
|
|
22
22
|
var _reactHookForm = require("react-hook-form");
|
|
23
23
|
var _sonner = require("sonner");
|
|
24
|
-
var _index = require("../../actions/index.
|
|
25
|
-
var _validation = require("../../validation.
|
|
24
|
+
var _index = require("../../actions/index.cjs");
|
|
25
|
+
var _validation = require("../../validation.cjs");
|
|
26
26
|
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); }
|
|
27
27
|
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; }
|
|
28
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { UseFormReturn } from "react-hook-form";
|
|
3
|
-
import { type LoginInput } from "../../validation
|
|
3
|
+
import { type LoginInput } from "../../validation";
|
|
4
4
|
export declare function useLoginForm(): {
|
|
5
5
|
form: UseFormReturn<LoginInput>;
|
|
6
6
|
};
|
|
@@ -19,8 +19,8 @@ import * as React from "react";
|
|
|
19
19
|
import { createContext, useContext, useState } from "react";
|
|
20
20
|
import { Controller, useForm } from "react-hook-form";
|
|
21
21
|
import { toast } from "sonner";
|
|
22
|
-
import { loginAction } from "../../actions/index.
|
|
23
|
-
import { loginSchema } from "../../validation.
|
|
22
|
+
import { loginAction } from "../../actions/index.mjs";
|
|
23
|
+
import { loginSchema } from "../../validation.mjs";
|
|
24
24
|
const LoginFormContext = createContext(null);
|
|
25
25
|
export function useLoginForm() {
|
|
26
26
|
const context = useContext(LoginFormContext);
|
package/dist/ui/signin/page.cjs
CHANGED
|
@@ -9,7 +9,7 @@ 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"));
|
|
12
|
-
var _components = require("./components.
|
|
12
|
+
var _components = require("./components.cjs");
|
|
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() {
|
package/dist/ui/signin/page.mjs
CHANGED
|
@@ -3,7 +3,7 @@ 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
|
-
import { LoginForm } from "./components.
|
|
6
|
+
import { LoginForm } from "./components.mjs";
|
|
7
7
|
export default async function Page() {
|
|
8
8
|
const { session, user } = await getCurrentSession();
|
|
9
9
|
if (session !== null && user !== null) {
|
|
@@ -21,8 +21,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
var React = _react;
|
|
22
22
|
var _reactHookForm = require("react-hook-form");
|
|
23
23
|
var _sonner = require("sonner");
|
|
24
|
-
var _index = require("../../actions/index.
|
|
25
|
-
var _validation = require("../../validation.
|
|
24
|
+
var _index = require("../../actions/index.cjs");
|
|
25
|
+
var _validation = require("../../validation.cjs");
|
|
26
26
|
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); }
|
|
27
27
|
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; }
|
|
28
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { UseFormReturn } from "react-hook-form";
|
|
3
|
-
import { type RegisterInput } from "../../validation
|
|
3
|
+
import { type RegisterInput } from "../../validation";
|
|
4
4
|
export declare function useSignUpForm(): {
|
|
5
5
|
form: UseFormReturn<RegisterInput>;
|
|
6
6
|
};
|
|
@@ -19,8 +19,8 @@ import * as React from "react";
|
|
|
19
19
|
import { createContext, useContext, useState } from "react";
|
|
20
20
|
import { Controller, useForm } from "react-hook-form";
|
|
21
21
|
import { toast } from "sonner";
|
|
22
|
-
import { signupAction } from "../../actions/index.
|
|
23
|
-
import { registerSchema } from "../../validation.
|
|
22
|
+
import { signupAction } from "../../actions/index.mjs";
|
|
23
|
+
import { registerSchema } from "../../validation.mjs";
|
|
24
24
|
const SignUpFormContext = createContext(null);
|
|
25
25
|
export function useSignUpForm() {
|
|
26
26
|
const context = useContext(SignUpFormContext);
|
package/dist/ui/signup/page.cjs
CHANGED
|
@@ -9,7 +9,7 @@ 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"));
|
|
12
|
-
var _components = require("./components.
|
|
12
|
+
var _components = require("./components.cjs");
|
|
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() {
|
package/dist/ui/signup/page.mjs
CHANGED
|
@@ -3,7 +3,7 @@ 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
|
-
import { SignUpForm } from "./components.
|
|
6
|
+
import { SignUpForm } from "./components.mjs";
|
|
7
7
|
export default async function Page() {
|
|
8
8
|
const { session, user } = await getCurrentSession();
|
|
9
9
|
if (session !== null && user !== null) {
|
|
@@ -17,8 +17,8 @@ var _lucideReact = require("lucide-react");
|
|
|
17
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
18
|
var _reactHookForm = require("react-hook-form");
|
|
19
19
|
var _sonner = require("sonner");
|
|
20
|
-
var _index = require("../../actions/index.
|
|
21
|
-
var _validation = require("../../validation.
|
|
20
|
+
var _index = require("../../actions/index.cjs");
|
|
21
|
+
var _validation = require("../../validation.cjs");
|
|
22
22
|
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); }
|
|
23
23
|
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; }
|
|
24
24
|
function EmailVerificationForm({
|
|
@@ -17,8 +17,8 @@ import { toast } from "sonner";
|
|
|
17
17
|
import {
|
|
18
18
|
resendEmailVerificationCodeAction,
|
|
19
19
|
verifyEmailAction
|
|
20
|
-
} from "../../actions/index.
|
|
21
|
-
import { verifyEmailSchema } from "../../validation.
|
|
20
|
+
} from "../../actions/index.mjs";
|
|
21
|
+
import { verifyEmailSchema } from "../../validation.mjs";
|
|
22
22
|
export function EmailVerificationForm({ email = "" }) {
|
|
23
23
|
const [generalError, setGeneralError] = useState("");
|
|
24
24
|
const { t } = useTranslation();
|
|
@@ -7,7 +7,7 @@ module.exports = Page;
|
|
|
7
7
|
var _server = require("@arch-cadre/core/server");
|
|
8
8
|
var _navigation = require("next/navigation");
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _components = require("./components.
|
|
10
|
+
var _components = require("./components.cjs");
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
13
|
async function Page() {
|
|
@@ -7,7 +7,7 @@ import * as React from "react";
|
|
|
7
7
|
import {
|
|
8
8
|
EmailVerificationForm,
|
|
9
9
|
ResendEmailVerificationCodeForm
|
|
10
|
-
} from "./components.
|
|
10
|
+
} from "./components.mjs";
|
|
11
11
|
export default async function Page() {
|
|
12
12
|
const { user } = await getCurrentSession();
|
|
13
13
|
if (user === null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arch-cadre/auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Auth module for Kryo framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"build": "unbuild"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@arch-cadre/modules": "^0.0.
|
|
35
|
-
"@arch-cadre/ui": "^0.0.
|
|
34
|
+
"@arch-cadre/modules": "^0.0.80",
|
|
35
|
+
"@arch-cadre/ui": "^0.0.54",
|
|
36
36
|
"@hookform/resolvers": "^3.10.0",
|
|
37
37
|
"lucide-react": "^0.475.0",
|
|
38
38
|
"react-hook-form": "^7.54.2",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"zod": "^3.24.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@arch-cadre/core": "^0.0.
|
|
43
|
+
"@arch-cadre/core": "^0.0.54",
|
|
44
44
|
"@types/react": "^19",
|
|
45
45
|
"next": "16.1.1",
|
|
46
46
|
"react": "^19.0.0",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"unbuild": "^3.6.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@arch-cadre/core": "^0.0.
|
|
52
|
-
"@arch-cadre/intl": "^0.0.
|
|
53
|
-
"@arch-cadre/ui": "^0.0.
|
|
51
|
+
"@arch-cadre/core": "^0.0.54",
|
|
52
|
+
"@arch-cadre/intl": "^0.0.54",
|
|
53
|
+
"@arch-cadre/ui": "^0.0.54",
|
|
54
54
|
"next": ">=13.0.0",
|
|
55
55
|
"react": "^19.0.0"
|
|
56
56
|
},
|
package/src/actions/basic.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { LoginInput, RegisterInput } from "@arch-cadre/core";
|
|
4
4
|
import { signIn, signOut, signUp } from "@arch-cadre/core/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
|
-
import type { ActionResult } from "../types
|
|
6
|
+
import type { ActionResult } from "../types";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Modern Login Action delegating to Core Auth
|
package/src/actions/email.ts
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
verifyPasswordStrength,
|
|
40
40
|
} from "@arch-cadre/core/server";
|
|
41
41
|
import { redirect } from "next/navigation";
|
|
42
|
-
import type { ActionResult } from "../types
|
|
42
|
+
import type { ActionResult } from "../types";
|
|
43
43
|
|
|
44
44
|
export async function forgotPasswordAction(
|
|
45
45
|
data: ForgotPasswordInput,
|
package/src/actions/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./basic
|
|
2
|
-
export * from "./email
|
|
1
|
+
export * from "./basic";
|
|
2
|
+
export * from "./email";
|
package/src/index.ts
CHANGED
package/src/routes.ts
CHANGED
|
@@ -3,16 +3,16 @@ import dynamic from "next/dynamic";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
// Layout
|
|
6
|
-
const AuthLayout = dynamic(() => import("./ui/layout
|
|
6
|
+
const AuthLayout = dynamic(() => import("./ui/layout"));
|
|
7
7
|
|
|
8
8
|
// Pages
|
|
9
|
-
const SignInPage = dynamic(() => import("./ui/signin/page
|
|
10
|
-
const SignUpPage = dynamic(() => import("./ui/signup/page
|
|
11
|
-
const ForgotPasswordPage = dynamic(() => import("./ui/forgot-password/page
|
|
12
|
-
const ResetPasswordPage = dynamic(() => import("./ui/reset-password/page
|
|
13
|
-
const VerifyEmailPage = dynamic(() => import("./ui/verify-email/page
|
|
9
|
+
const SignInPage = dynamic(() => import("./ui/signin/page"));
|
|
10
|
+
const SignUpPage = dynamic(() => import("./ui/signup/page"));
|
|
11
|
+
const ForgotPasswordPage = dynamic(() => import("./ui/forgot-password/page"));
|
|
12
|
+
const ResetPasswordPage = dynamic(() => import("./ui/reset-password/page"));
|
|
13
|
+
const VerifyEmailPage = dynamic(() => import("./ui/verify-email/page"));
|
|
14
14
|
const ResetPasswordVerifyEmailPage = dynamic(
|
|
15
|
-
() => import("./ui/reset-password/verify-email/page
|
|
15
|
+
() => import("./ui/reset-password/verify-email/page"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
export const publicRoutes: PublicRouteDefinition[] = [
|
|
@@ -14,11 +14,11 @@ import * as React from "react";
|
|
|
14
14
|
import { useState } from "react";
|
|
15
15
|
import { Controller, useForm } from "react-hook-form";
|
|
16
16
|
import { toast } from "sonner";
|
|
17
|
-
import { forgotPasswordAction } from "../../actions/index
|
|
17
|
+
import { forgotPasswordAction } from "../../actions/index";
|
|
18
18
|
import {
|
|
19
19
|
type ForgotPasswordInput,
|
|
20
20
|
forgotPasswordSchema,
|
|
21
|
-
} from "../../validation
|
|
21
|
+
} from "../../validation";
|
|
22
22
|
|
|
23
23
|
export function ForgotPasswordForm() {
|
|
24
24
|
const [generalError, setGeneralError] = useState("");
|
|
@@ -26,8 +26,8 @@ import * as React from "react";
|
|
|
26
26
|
import { useState } from "react";
|
|
27
27
|
import { Controller, useForm } from "react-hook-form";
|
|
28
28
|
import { toast } from "sonner";
|
|
29
|
-
import { resetPasswordAction } from "../../actions/index
|
|
30
|
-
import { type ResetPasswordInput, resetPasswordSchema } from "../../validation
|
|
29
|
+
import { resetPasswordAction } from "../../actions/index";
|
|
30
|
+
import { type ResetPasswordInput, resetPasswordSchema } from "../../validation";
|
|
31
31
|
|
|
32
32
|
export function ResetPasswordForm() {
|
|
33
33
|
const [generalError, setGeneralError] = useState("");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "@arch-cadre/core/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { ResetPasswordForm } from "./components
|
|
7
|
+
import { ResetPasswordForm } from "./components";
|
|
8
8
|
|
|
9
9
|
export default async function Page() {
|
|
10
10
|
const { session, user } = await getCurrentPasswordResetSession();
|
|
@@ -20,8 +20,8 @@ import * as React from "react";
|
|
|
20
20
|
import { useState } from "react";
|
|
21
21
|
import { Controller, useForm } from "react-hook-form";
|
|
22
22
|
import { toast } from "sonner";
|
|
23
|
-
import { verifyPasswordResetEmailAction } from "../../../actions/index
|
|
24
|
-
import { type VerifyEmailInput, verifyEmailSchema } from "../../../validation
|
|
23
|
+
import { verifyPasswordResetEmailAction } from "../../../actions/index";
|
|
24
|
+
import { type VerifyEmailInput, verifyEmailSchema } from "../../../validation";
|
|
25
25
|
|
|
26
26
|
export function PasswordResetEmailVerificationForm({ email = "" }) {
|
|
27
27
|
const [generalError, setGeneralError] = useState("");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "@arch-cadre/core/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { PasswordResetEmailVerificationForm } from "./components
|
|
7
|
+
import { PasswordResetEmailVerificationForm } from "./components";
|
|
8
8
|
|
|
9
9
|
export default async function Page() {
|
|
10
10
|
const { session, user } = await getCurrentPasswordResetSession();
|
|
@@ -21,8 +21,8 @@ import { createContext, useContext, useState } from "react";
|
|
|
21
21
|
import type { UseFormReturn } from "react-hook-form";
|
|
22
22
|
import { Controller, useForm } from "react-hook-form";
|
|
23
23
|
import { toast } from "sonner";
|
|
24
|
-
import { loginAction } from "../../actions/index
|
|
25
|
-
import { type LoginInput, loginSchema } from "../../validation
|
|
24
|
+
import { loginAction } from "../../actions/index";
|
|
25
|
+
import { type LoginInput, loginSchema } from "../../validation";
|
|
26
26
|
|
|
27
27
|
const LoginFormContext = createContext<{
|
|
28
28
|
form: UseFormReturn<LoginInput>;
|
package/src/ui/signin/page.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { ExtensionPoint } from "@arch-cadre/modules";
|
|
|
4
4
|
import { hasExtension } from "@arch-cadre/modules/server";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { LoginForm } from "./components
|
|
7
|
+
import { LoginForm } from "./components";
|
|
8
8
|
|
|
9
9
|
export default async function Page() {
|
|
10
10
|
const { session, user } = await getCurrentSession();
|
|
@@ -20,8 +20,8 @@ import { createContext, useContext, useState } from "react";
|
|
|
20
20
|
import type { UseFormReturn } from "react-hook-form";
|
|
21
21
|
import { Controller, useForm } from "react-hook-form";
|
|
22
22
|
import { toast } from "sonner";
|
|
23
|
-
import { signupAction } from "../../actions/index
|
|
24
|
-
import { type RegisterInput, registerSchema } from "../../validation
|
|
23
|
+
import { signupAction } from "../../actions/index";
|
|
24
|
+
import { type RegisterInput, registerSchema } from "../../validation";
|
|
25
25
|
|
|
26
26
|
const SignUpFormContext = createContext<{
|
|
27
27
|
form: UseFormReturn<RegisterInput>;
|
package/src/ui/signup/page.tsx
CHANGED
|
@@ -3,7 +3,7 @@ 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
|
-
import { SignUpForm } from "./components
|
|
6
|
+
import { SignUpForm } from "./components";
|
|
7
7
|
|
|
8
8
|
export default async function Page() {
|
|
9
9
|
const { session, user } = await getCurrentSession();
|
|
@@ -17,8 +17,8 @@ import { toast } from "sonner";
|
|
|
17
17
|
import {
|
|
18
18
|
resendEmailVerificationCodeAction,
|
|
19
19
|
verifyEmailAction,
|
|
20
|
-
} from "../../actions/index
|
|
21
|
-
import { type VerifyEmailInput, verifyEmailSchema } from "../../validation
|
|
20
|
+
} from "../../actions/index";
|
|
21
|
+
import { type VerifyEmailInput, verifyEmailSchema } from "../../validation";
|
|
22
22
|
|
|
23
23
|
export function EmailVerificationForm({ email = "" }) {
|
|
24
24
|
const [generalError, setGeneralError] = useState("");
|