authverse 1.1.4 → 1.1.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.
@@ -20,6 +20,7 @@ import { Input } from "@/components/ui/input";
20
20
  import { useState } from "react";
21
21
  import { Link } from "@tanstack/react-router";
22
22
  import { authClient } from "@/lib/auth-client";
23
+ import { useNavigate } from "@tanstack/react-router";
23
24
 
24
25
  const formSchema = z.object({
25
26
  email: z.string().email(),
@@ -30,6 +31,7 @@ const formSchema = z.object({
30
31
 
31
32
  const LoginComponent = () => {
32
33
  const [isLoading, setIsLoading] = useState(false);
34
+ const navigate = useNavigate();
33
35
 
34
36
  const form = useForm({
35
37
  defaultValues: {
@@ -50,12 +52,13 @@ const LoginComponent = () => {
50
52
  {
51
53
  onSuccess: () => {
52
54
  toast.success("Login successful!");
55
+ navigate({ to: "/" });
53
56
  },
54
57
  onError: (error: any) => {
55
58
  setIsLoading(false);
56
59
  toast.error(error.error.message);
57
60
  },
58
- }
61
+ },
59
62
  );
60
63
  },
61
64
  });
@@ -19,7 +19,8 @@ import {
19
19
  import { Input } from "@/components/ui/input";
20
20
  import { useState } from "react";
21
21
  import { authClient } from "@/lib/auth-client";
22
- import { redirect, useSearch } from "@tanstack/react-router";
22
+ import { useSearch } from "@tanstack/react-router";
23
+ import { useNavigate } from "@tanstack/react-router";
23
24
 
24
25
  const formSchema = z
25
26
  .object({
@@ -36,6 +37,7 @@ const formSchema = z
36
37
  const ResetComponent = () => {
37
38
  const [isLoading, setIsLoading] = useState(false);
38
39
  const { token } = useSearch({ from: "/auth/reset-password" });
40
+ const navigate = useNavigate();
39
41
 
40
42
  const form = useForm({
41
43
  defaultValues: {
@@ -55,15 +57,15 @@ const ResetComponent = () => {
55
57
  {
56
58
  onSuccess: () => {
57
59
  toast.success(
58
- "Password has been reset successfully. You can now log in with your new password."
60
+ "Password has been reset successfully. You can now log in with your new password.",
59
61
  );
60
- redirect({ to: "/" });
62
+ navigate({ to: "/" });
61
63
  },
62
64
  onError: (error: any) => {
63
65
  setIsLoading(false);
64
66
  toast.error(error.error.message);
65
67
  },
66
- }
68
+ },
67
69
  );
68
70
  },
69
71
  });
@@ -20,6 +20,7 @@ import { Input } from "@/components/ui/input";
20
20
  import { useState } from "react";
21
21
  import { Link } from "@tanstack/react-router";
22
22
  import { authClient } from "@/lib/auth-client";
23
+ import { useNavigate } from "@tanstack/react-router";
23
24
 
24
25
  const formSchema = z.object({
25
26
  name: z.string().min(3, {
@@ -33,6 +34,7 @@ const formSchema = z.object({
33
34
 
34
35
  const SingUpComponent = () => {
35
36
  const [isLoading, setIsLoading] = useState(false);
37
+ const navigate = useNavigate();
36
38
 
37
39
  const form = useForm({
38
40
  defaultValues: {
@@ -55,12 +57,13 @@ const SingUpComponent = () => {
55
57
  {
56
58
  onSuccess: () => {
57
59
  toast.success("Sign up successful!");
60
+ navigate({ to: "/" });
58
61
  },
59
62
  onError: (error: any) => {
60
63
  setIsLoading(false);
61
64
  toast.error(error.error.message);
62
65
  },
63
- }
66
+ },
64
67
  );
65
68
  },
66
69
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authverse",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Authverse Fast modern CLI to generate full auth systems with OAuth Prisma Drizzle better auth and ready-to-use ShadCN UI screens",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/abdirahmanmahamoud/authverse.git",
@@ -20,9 +20,8 @@
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsup ./index.ts --format esm,cjs --dts --out-dir dist && cp -r ../template ./dist/template",
23
- "build:windows": "tsup ./index.ts --format esm,cjs --dts --out-dir dist && xcopy ..\\template dist\\template /E /I /Y && npm link",
24
- "dev": "tsup ./index.ts --watch --onSuccess \"node dist/index.js\"",
25
- "semantic-release": "semantic-release"
23
+ "build:win": "tsup ./index.ts --format esm,cjs --dts --out-dir dist && xcopy ..\\template dist\\template /E /I /Y && npm link",
24
+ "clear": "pnpm dlx rimraf dist"
26
25
  },
27
26
  "publishConfig": {
28
27
  "access": "public"
@@ -50,15 +49,10 @@
50
49
  "inquirer": "^12.10.0"
51
50
  },
52
51
  "devDependencies": {
53
- "@semantic-release/changelog": "^6.0.3",
54
- "@semantic-release/commit-analyzer": "^13.0.1",
55
- "@semantic-release/git": "^10.0.1",
56
- "@semantic-release/github": "^12.0.2",
57
- "@semantic-release/npm": "^13.1.2",
58
- "@semantic-release/release-notes-generator": "^14.1.0",
59
- "@types/node": "^25.0.8",
60
- "conventional-changelog-conventionalcommits": "^9.1.0",
61
- "semantic-release": "^25.0.2",
52
+ "@commitlint/cli": "^20.3.1",
53
+ "@commitlint/config-conventional": "^20.3.1",
54
+ "@types/node": "^25.2.3",
55
+ "changelogithub": "^14.0.0",
62
56
  "tsup": "^8.5.0",
63
57
  "typescript": "^5.9.3"
64
58
  }