authverse 1.0.4 → 1.0.5
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/index.cjs
CHANGED
|
@@ -33,9 +33,8 @@ var import_url2 = require("url");
|
|
|
33
33
|
var import_path2 = __toESM(require("path"), 1);
|
|
34
34
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
35
35
|
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
36
|
-
var import_child_process2 = require("child_process");
|
|
37
36
|
|
|
38
|
-
//
|
|
37
|
+
// utils/GenerateSecret.ts
|
|
39
38
|
var import_crypto = __toESM(require("crypto"), 1);
|
|
40
39
|
var GenerateSecret = async () => {
|
|
41
40
|
const secret = import_crypto.default.randomBytes(64).toString("hex");
|
|
@@ -44,20 +43,53 @@ var GenerateSecret = async () => {
|
|
|
44
43
|
|
|
45
44
|
// script/authUi.ts
|
|
46
45
|
var import_chalk = __toESM(require("chalk"), 1);
|
|
47
|
-
var import_child_process = require("child_process");
|
|
48
46
|
var import_path = __toESM(require("path"), 1);
|
|
49
47
|
var import_fs = __toESM(require("fs"), 1);
|
|
50
48
|
var import_url = require("url");
|
|
49
|
+
|
|
50
|
+
// utils/packageManager.ts
|
|
51
|
+
var import_child_process = require("child_process");
|
|
52
|
+
var getPackageManager = () => {
|
|
53
|
+
const ua = process.env.npm_config_user_agent || "";
|
|
54
|
+
if (ua.includes("bun")) return "bun";
|
|
55
|
+
if (ua.includes("pnpm")) return "pnpm";
|
|
56
|
+
if (ua.includes("yarn")) return "yarn";
|
|
57
|
+
return "npm";
|
|
58
|
+
};
|
|
59
|
+
var pm = getPackageManager();
|
|
60
|
+
var packageManager = (pkg, dev = false) => {
|
|
61
|
+
if (pm === "pnpm") {
|
|
62
|
+
(0, import_child_process.execSync)(`pnpm add ${dev ? "-D " : ""}${pkg}`, { stdio: "inherit" });
|
|
63
|
+
} else if (pm === "yarn") {
|
|
64
|
+
(0, import_child_process.execSync)(`yarn add ${dev ? "--dev " : ""}${pkg}`, { stdio: "inherit" });
|
|
65
|
+
} else if (pm === "bun") {
|
|
66
|
+
(0, import_child_process.execSync)(`bun add ${dev ? "-d " : ""}${pkg}`, { stdio: "inherit" });
|
|
67
|
+
} else {
|
|
68
|
+
(0, import_child_process.execSync)(`npm install ${pkg} ${dev ? "--save-dev" : ""}`, {
|
|
69
|
+
stdio: "inherit"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var runCommand = (cmd) => {
|
|
74
|
+
const pm2 = getPackageManager();
|
|
75
|
+
if (pm2 === "pnpm") {
|
|
76
|
+
(0, import_child_process.execSync)(`pnpm dlx ${cmd}`, { stdio: "inherit" });
|
|
77
|
+
} else if (pm2 === "bun") {
|
|
78
|
+
(0, import_child_process.execSync)(`bunx ${cmd}`, { stdio: "inherit" });
|
|
79
|
+
} else if (pm2 === "yarn") {
|
|
80
|
+
(0, import_child_process.execSync)(`yarn dlx ${cmd}`, { stdio: "inherit" });
|
|
81
|
+
} else {
|
|
82
|
+
(0, import_child_process.execSync)(`npx ${cmd}`, { stdio: "inherit" });
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// script/authUi.ts
|
|
51
87
|
var import_meta = {};
|
|
52
88
|
var authUiRun = async ({ folder }) => {
|
|
53
89
|
try {
|
|
54
90
|
console.log(import_chalk.default.yellow("\n Updating AuthUi Files\n"));
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
(0, import_child_process.execSync)("npm install react-hook-form @hookform/resolvers", {
|
|
59
|
-
stdio: "inherit"
|
|
60
|
-
});
|
|
91
|
+
runCommand("shadcn@latest add button sonner card field input");
|
|
92
|
+
packageManager("react-hook-form @hookform/resolvers");
|
|
61
93
|
const __filename = (0, import_url.fileURLToPath)(import_meta.url);
|
|
62
94
|
const __dirname = import_path.default.dirname(__filename);
|
|
63
95
|
const projectDir = process.cwd();
|
|
@@ -147,23 +179,23 @@ var prismaRun = async ({ authUi, database }) => {
|
|
|
147
179
|
try {
|
|
148
180
|
console.log(import_chalk2.default.cyan("\n\u2699\uFE0F Initializing Prisma...\n"));
|
|
149
181
|
if (database !== "Mongodb") {
|
|
150
|
-
(
|
|
151
|
-
(
|
|
182
|
+
packageManager("prisma", true);
|
|
183
|
+
packageManager("@prisma/client");
|
|
152
184
|
if (database === "Mysql") {
|
|
153
|
-
(
|
|
185
|
+
packageManager("@prisma/adapter-mariadb");
|
|
154
186
|
}
|
|
155
187
|
if (database === "Postgresql") {
|
|
156
|
-
(
|
|
188
|
+
packageManager("@prisma/adapter-pg");
|
|
157
189
|
}
|
|
158
190
|
} else if (database === "Mongodb") {
|
|
159
|
-
(
|
|
160
|
-
(
|
|
191
|
+
packageManager("prisma@6.19.0", true);
|
|
192
|
+
packageManager("@prisma/client@6.19.0");
|
|
161
193
|
}
|
|
162
194
|
const projectDir = process.cwd();
|
|
163
195
|
const prismaDir = import_path2.default.join(projectDir, "prisma");
|
|
164
196
|
if (!import_fs2.default.existsSync(prismaDir)) {
|
|
165
197
|
console.log(import_chalk2.default.yellow("\n\u2699\uFE0F Initializing Prisma...\n"));
|
|
166
|
-
(
|
|
198
|
+
runCommand("prisma init");
|
|
167
199
|
}
|
|
168
200
|
const __filename = (0, import_url2.fileURLToPath)(import_meta2.url);
|
|
169
201
|
const __dirname = import_path2.default.dirname(__filename);
|
|
@@ -185,7 +217,7 @@ var prismaRun = async ({ authUi, database }) => {
|
|
|
185
217
|
import_fs2.default.copyFileSync(prismaConfigPath, prismaConfigDestinationPath);
|
|
186
218
|
}
|
|
187
219
|
console.log(import_chalk2.default.yellow("\n\u2699\uFE0F Initializing better-auth...\n"));
|
|
188
|
-
(
|
|
220
|
+
packageManager("better-auth");
|
|
189
221
|
const secret = await GenerateSecret();
|
|
190
222
|
const envPath = import_path2.default.join(projectDir, ".env");
|
|
191
223
|
import_fs2.default.appendFileSync(envPath, `
|
|
@@ -262,7 +294,6 @@ BETTER_AUTH_URL=http://localhost:3000
|
|
|
262
294
|
|
|
263
295
|
// script/drizzleRun.ts
|
|
264
296
|
var import_chalk3 = __toESM(require("chalk"), 1);
|
|
265
|
-
var import_child_process3 = require("child_process");
|
|
266
297
|
var import_path3 = __toESM(require("path"), 1);
|
|
267
298
|
var import_url3 = require("url");
|
|
268
299
|
var import_fs3 = __toESM(require("fs"), 1);
|
|
@@ -270,11 +301,9 @@ var import_meta3 = {};
|
|
|
270
301
|
var drizzleRun = async (authUi) => {
|
|
271
302
|
try {
|
|
272
303
|
console.log(import_chalk3.default.cyan("\n\u2699\uFE0F Initializing better auth and drizzle...\n"));
|
|
273
|
-
(
|
|
274
|
-
(
|
|
275
|
-
|
|
276
|
-
});
|
|
277
|
-
(0, import_child_process3.execSync)("npm install -D drizzle-kit", { stdio: "inherit" });
|
|
304
|
+
packageManager("better-auth");
|
|
305
|
+
packageManager("drizzle-orm @neondatabase/serverless dotenv");
|
|
306
|
+
packageManager("drizzle-kit", true);
|
|
278
307
|
const __filename = (0, import_url3.fileURLToPath)(import_meta3.url);
|
|
279
308
|
const __dirname = import_path3.default.dirname(__filename);
|
|
280
309
|
const projectDir = process.cwd();
|
|
@@ -414,14 +443,12 @@ var import_chalk6 = __toESM(require("chalk"), 1);
|
|
|
414
443
|
|
|
415
444
|
// script/googleRun.ts
|
|
416
445
|
var import_chalk4 = __toESM(require("chalk"), 1);
|
|
417
|
-
var import_child_process4 = require("child_process");
|
|
418
446
|
var import_fs4 = __toESM(require("fs"), 1);
|
|
419
447
|
var import_path4 = __toESM(require("path"), 1);
|
|
420
448
|
var import_url4 = require("url");
|
|
421
449
|
var import_meta4 = {};
|
|
422
450
|
var googleRun = async () => {
|
|
423
451
|
try {
|
|
424
|
-
(0, import_child_process4.execSync)("npm install react-icons --save", { stdio: "inherit" });
|
|
425
452
|
const __filename = (0, import_url4.fileURLToPath)(import_meta4.url);
|
|
426
453
|
const __dirname = import_path4.default.dirname(__filename);
|
|
427
454
|
const projectDir = process.cwd();
|
|
@@ -485,14 +512,12 @@ GOOGLE_CLIENT_SECRET=`);
|
|
|
485
512
|
|
|
486
513
|
// script/githubRun.ts
|
|
487
514
|
var import_chalk5 = __toESM(require("chalk"), 1);
|
|
488
|
-
var import_child_process5 = require("child_process");
|
|
489
515
|
var import_fs5 = __toESM(require("fs"), 1);
|
|
490
516
|
var import_path5 = __toESM(require("path"), 1);
|
|
491
517
|
var import_url5 = require("url");
|
|
492
518
|
var import_meta5 = {};
|
|
493
519
|
var githubRun = async () => {
|
|
494
520
|
try {
|
|
495
|
-
(0, import_child_process5.execSync)("npm install react-icons --save", { stdio: "inherit" });
|
|
496
521
|
const __filename = (0, import_url5.fileURLToPath)(import_meta5.url);
|
|
497
522
|
const __dirname = import_path5.default.dirname(__filename);
|
|
498
523
|
const projectDir = process.cwd();
|
|
@@ -600,14 +625,14 @@ var providers = async ({ provider }) => {
|
|
|
600
625
|
|
|
601
626
|
// cli/forget.ts
|
|
602
627
|
var import_chalk7 = __toESM(require("chalk"), 1);
|
|
603
|
-
var
|
|
628
|
+
var import_child_process2 = require("child_process");
|
|
604
629
|
var import_path6 = __toESM(require("path"), 1);
|
|
605
630
|
var import_url6 = require("url");
|
|
606
631
|
var import_fs6 = __toESM(require("fs"), 1);
|
|
607
632
|
var import_meta6 = {};
|
|
608
633
|
var forget = async () => {
|
|
609
634
|
try {
|
|
610
|
-
(0,
|
|
635
|
+
(0, import_child_process2.execSync)("npm install @react-email/components resend", {
|
|
611
636
|
stdio: "inherit"
|
|
612
637
|
});
|
|
613
638
|
const __filename = (0, import_url6.fileURLToPath)(import_meta6.url);
|
package/dist/index.js
CHANGED
|
@@ -11,9 +11,8 @@ import { fileURLToPath as fileURLToPath2 } from "url";
|
|
|
11
11
|
import path2 from "path";
|
|
12
12
|
import fs2 from "fs";
|
|
13
13
|
import chalk2 from "chalk";
|
|
14
|
-
import { execSync as execSync2 } from "child_process";
|
|
15
14
|
|
|
16
|
-
//
|
|
15
|
+
// utils/GenerateSecret.ts
|
|
17
16
|
import crypto from "crypto";
|
|
18
17
|
var GenerateSecret = async () => {
|
|
19
18
|
const secret = crypto.randomBytes(64).toString("hex");
|
|
@@ -22,19 +21,52 @@ var GenerateSecret = async () => {
|
|
|
22
21
|
|
|
23
22
|
// script/authUi.ts
|
|
24
23
|
import chalk from "chalk";
|
|
25
|
-
import { execSync } from "child_process";
|
|
26
24
|
import path from "path";
|
|
27
25
|
import fs from "fs";
|
|
28
26
|
import { fileURLToPath } from "url";
|
|
27
|
+
|
|
28
|
+
// utils/packageManager.ts
|
|
29
|
+
import { execSync } from "child_process";
|
|
30
|
+
var getPackageManager = () => {
|
|
31
|
+
const ua = process.env.npm_config_user_agent || "";
|
|
32
|
+
if (ua.includes("bun")) return "bun";
|
|
33
|
+
if (ua.includes("pnpm")) return "pnpm";
|
|
34
|
+
if (ua.includes("yarn")) return "yarn";
|
|
35
|
+
return "npm";
|
|
36
|
+
};
|
|
37
|
+
var pm = getPackageManager();
|
|
38
|
+
var packageManager = (pkg, dev = false) => {
|
|
39
|
+
if (pm === "pnpm") {
|
|
40
|
+
execSync(`pnpm add ${dev ? "-D " : ""}${pkg}`, { stdio: "inherit" });
|
|
41
|
+
} else if (pm === "yarn") {
|
|
42
|
+
execSync(`yarn add ${dev ? "--dev " : ""}${pkg}`, { stdio: "inherit" });
|
|
43
|
+
} else if (pm === "bun") {
|
|
44
|
+
execSync(`bun add ${dev ? "-d " : ""}${pkg}`, { stdio: "inherit" });
|
|
45
|
+
} else {
|
|
46
|
+
execSync(`npm install ${pkg} ${dev ? "--save-dev" : ""}`, {
|
|
47
|
+
stdio: "inherit"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var runCommand = (cmd) => {
|
|
52
|
+
const pm2 = getPackageManager();
|
|
53
|
+
if (pm2 === "pnpm") {
|
|
54
|
+
execSync(`pnpm dlx ${cmd}`, { stdio: "inherit" });
|
|
55
|
+
} else if (pm2 === "bun") {
|
|
56
|
+
execSync(`bunx ${cmd}`, { stdio: "inherit" });
|
|
57
|
+
} else if (pm2 === "yarn") {
|
|
58
|
+
execSync(`yarn dlx ${cmd}`, { stdio: "inherit" });
|
|
59
|
+
} else {
|
|
60
|
+
execSync(`npx ${cmd}`, { stdio: "inherit" });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// script/authUi.ts
|
|
29
65
|
var authUiRun = async ({ folder }) => {
|
|
30
66
|
try {
|
|
31
67
|
console.log(chalk.yellow("\n Updating AuthUi Files\n"));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
execSync("npm install react-hook-form @hookform/resolvers", {
|
|
36
|
-
stdio: "inherit"
|
|
37
|
-
});
|
|
68
|
+
runCommand("shadcn@latest add button sonner card field input");
|
|
69
|
+
packageManager("react-hook-form @hookform/resolvers");
|
|
38
70
|
const __filename = fileURLToPath(import.meta.url);
|
|
39
71
|
const __dirname = path.dirname(__filename);
|
|
40
72
|
const projectDir = process.cwd();
|
|
@@ -123,23 +155,23 @@ var prismaRun = async ({ authUi, database }) => {
|
|
|
123
155
|
try {
|
|
124
156
|
console.log(chalk2.cyan("\n\u2699\uFE0F Initializing Prisma...\n"));
|
|
125
157
|
if (database !== "Mongodb") {
|
|
126
|
-
|
|
127
|
-
|
|
158
|
+
packageManager("prisma", true);
|
|
159
|
+
packageManager("@prisma/client");
|
|
128
160
|
if (database === "Mysql") {
|
|
129
|
-
|
|
161
|
+
packageManager("@prisma/adapter-mariadb");
|
|
130
162
|
}
|
|
131
163
|
if (database === "Postgresql") {
|
|
132
|
-
|
|
164
|
+
packageManager("@prisma/adapter-pg");
|
|
133
165
|
}
|
|
134
166
|
} else if (database === "Mongodb") {
|
|
135
|
-
|
|
136
|
-
|
|
167
|
+
packageManager("prisma@6.19.0", true);
|
|
168
|
+
packageManager("@prisma/client@6.19.0");
|
|
137
169
|
}
|
|
138
170
|
const projectDir = process.cwd();
|
|
139
171
|
const prismaDir = path2.join(projectDir, "prisma");
|
|
140
172
|
if (!fs2.existsSync(prismaDir)) {
|
|
141
173
|
console.log(chalk2.yellow("\n\u2699\uFE0F Initializing Prisma...\n"));
|
|
142
|
-
|
|
174
|
+
runCommand("prisma init");
|
|
143
175
|
}
|
|
144
176
|
const __filename = fileURLToPath2(import.meta.url);
|
|
145
177
|
const __dirname = path2.dirname(__filename);
|
|
@@ -161,7 +193,7 @@ var prismaRun = async ({ authUi, database }) => {
|
|
|
161
193
|
fs2.copyFileSync(prismaConfigPath, prismaConfigDestinationPath);
|
|
162
194
|
}
|
|
163
195
|
console.log(chalk2.yellow("\n\u2699\uFE0F Initializing better-auth...\n"));
|
|
164
|
-
|
|
196
|
+
packageManager("better-auth");
|
|
165
197
|
const secret = await GenerateSecret();
|
|
166
198
|
const envPath = path2.join(projectDir, ".env");
|
|
167
199
|
fs2.appendFileSync(envPath, `
|
|
@@ -238,18 +270,15 @@ BETTER_AUTH_URL=http://localhost:3000
|
|
|
238
270
|
|
|
239
271
|
// script/drizzleRun.ts
|
|
240
272
|
import chalk3 from "chalk";
|
|
241
|
-
import { execSync as execSync3 } from "child_process";
|
|
242
273
|
import path3 from "path";
|
|
243
274
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
244
275
|
import fs3 from "fs";
|
|
245
276
|
var drizzleRun = async (authUi) => {
|
|
246
277
|
try {
|
|
247
278
|
console.log(chalk3.cyan("\n\u2699\uFE0F Initializing better auth and drizzle...\n"));
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
});
|
|
252
|
-
execSync3("npm install -D drizzle-kit", { stdio: "inherit" });
|
|
279
|
+
packageManager("better-auth");
|
|
280
|
+
packageManager("drizzle-orm @neondatabase/serverless dotenv");
|
|
281
|
+
packageManager("drizzle-kit", true);
|
|
253
282
|
const __filename = fileURLToPath3(import.meta.url);
|
|
254
283
|
const __dirname = path3.dirname(__filename);
|
|
255
284
|
const projectDir = process.cwd();
|
|
@@ -389,13 +418,11 @@ import chalk6 from "chalk";
|
|
|
389
418
|
|
|
390
419
|
// script/googleRun.ts
|
|
391
420
|
import chalk4 from "chalk";
|
|
392
|
-
import { execSync as execSync4 } from "child_process";
|
|
393
421
|
import fs4 from "fs";
|
|
394
422
|
import path4 from "path";
|
|
395
423
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
396
424
|
var googleRun = async () => {
|
|
397
425
|
try {
|
|
398
|
-
execSync4("npm install react-icons --save", { stdio: "inherit" });
|
|
399
426
|
const __filename = fileURLToPath4(import.meta.url);
|
|
400
427
|
const __dirname = path4.dirname(__filename);
|
|
401
428
|
const projectDir = process.cwd();
|
|
@@ -459,13 +486,11 @@ GOOGLE_CLIENT_SECRET=`);
|
|
|
459
486
|
|
|
460
487
|
// script/githubRun.ts
|
|
461
488
|
import chalk5 from "chalk";
|
|
462
|
-
import { execSync as execSync5 } from "child_process";
|
|
463
489
|
import fs5 from "fs";
|
|
464
490
|
import path5 from "path";
|
|
465
491
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
466
492
|
var githubRun = async () => {
|
|
467
493
|
try {
|
|
468
|
-
execSync5("npm install react-icons --save", { stdio: "inherit" });
|
|
469
494
|
const __filename = fileURLToPath5(import.meta.url);
|
|
470
495
|
const __dirname = path5.dirname(__filename);
|
|
471
496
|
const projectDir = process.cwd();
|
|
@@ -573,13 +598,13 @@ var providers = async ({ provider }) => {
|
|
|
573
598
|
|
|
574
599
|
// cli/forget.ts
|
|
575
600
|
import chalk7 from "chalk";
|
|
576
|
-
import { execSync as
|
|
601
|
+
import { execSync as execSync2 } from "child_process";
|
|
577
602
|
import path6 from "path";
|
|
578
603
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
579
604
|
import fs6 from "fs";
|
|
580
605
|
var forget = async () => {
|
|
581
606
|
try {
|
|
582
|
-
|
|
607
|
+
execSync2("npm install @react-email/components resend", {
|
|
583
608
|
stdio: "inherit"
|
|
584
609
|
});
|
|
585
610
|
const __filename = fileURLToPath6(import.meta.url);
|
|
@@ -2,18 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
import { authClient } from "@/lib/auth-client";
|
|
4
4
|
import { Button } from "../ui/button";
|
|
5
|
-
import { FaGithub } from "react-icons/fa";
|
|
6
5
|
|
|
7
6
|
const GithubProviders = () => {
|
|
8
7
|
const signIn = async () => {
|
|
9
|
-
|
|
8
|
+
await authClient.signIn.social({
|
|
10
9
|
provider: "github",
|
|
11
10
|
});
|
|
12
11
|
};
|
|
12
|
+
|
|
13
13
|
return (
|
|
14
|
-
<Button
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<Button
|
|
15
|
+
className="w-full text-base flex items-center gap-2"
|
|
16
|
+
variant="outline"
|
|
17
|
+
onClick={signIn}
|
|
18
|
+
>
|
|
19
|
+
{/* GitHub SVG Icon */}
|
|
20
|
+
<svg
|
|
21
|
+
width="20"
|
|
22
|
+
height="20"
|
|
23
|
+
viewBox="0 0 24 24"
|
|
24
|
+
fill="currentColor"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
className="text-black dark:text-white"
|
|
27
|
+
>
|
|
28
|
+
<path d="M12 .5C5.73.5.5 5.74.5 12.03c0 5.13 3.29 9.47 7.86 11 .58.1.79-.25.79-.56v-2.1c-3.2.7-3.88-1.54-3.88-1.54-.52-1.33-1.27-1.69-1.27-1.69-1.04-.72.08-.7.08-.7 1.15.08 1.75 1.19 1.75 1.19 1.02 1.75 2.68 1.24 3.34.95.1-.74.4-1.24.73-1.53-2.55-.29-5.23-1.28-5.23-5.7 0-1.26.45-2.3 1.19-3.11-.12-.29-.52-1.45.11-3.02 0 0 .97-.31 3.18 1.19.92-.26 1.9-.39 2.88-.39.98 0 1.96.13 2.88.39 2.2-1.5 3.17-1.19 3.17-1.19.63 1.57.23 2.73.11 3.02.74.81 1.19 1.85 1.19 3.11 0 4.43-2.69 5.4-5.25 5.68.41.35.77 1.04.77 2.1v3.11c0 .31.21.67.8.56 4.57-1.53 7.85-5.87 7.85-11C23.5 5.74 18.27.5 12 .5z" />
|
|
29
|
+
</svg>
|
|
30
|
+
|
|
31
|
+
<span>Sign in with GitHub</span>
|
|
17
32
|
</Button>
|
|
18
33
|
);
|
|
19
34
|
};
|
|
@@ -2,18 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
import { authClient } from "@/lib/auth-client";
|
|
4
4
|
import { Button } from "../ui/button";
|
|
5
|
-
import { FaGoogle } from "react-icons/fa";
|
|
6
5
|
|
|
7
6
|
const GoogleProviders = () => {
|
|
8
7
|
const signIn = async () => {
|
|
9
|
-
|
|
8
|
+
await authClient.signIn.social({
|
|
10
9
|
provider: "google",
|
|
11
10
|
});
|
|
12
11
|
};
|
|
12
|
+
|
|
13
13
|
return (
|
|
14
|
-
<Button
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<Button
|
|
15
|
+
className="w-full text-base flex items-center gap-2"
|
|
16
|
+
variant="outline"
|
|
17
|
+
onClick={signIn}
|
|
18
|
+
>
|
|
19
|
+
<svg
|
|
20
|
+
width="20"
|
|
21
|
+
height="20"
|
|
22
|
+
viewBox="0 0 48 48"
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
>
|
|
25
|
+
<path
|
|
26
|
+
fill="#EA4335"
|
|
27
|
+
d="M24 9.5c3.54 0 6.7 1.23 9.2 3.64l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.2C12.43 13.02 17.74 9.5 24 9.5z"
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
fill="#4285F4"
|
|
31
|
+
d="M46.98 24.55c0-1.64-.15-3.22-.43-4.76H24v9.02h12.95c-.56 3.01-2.24 5.56-4.78 7.28l7.73 5.99c4.51-4.18 7.08-10.35 7.08-17.53z"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
fill="#FBBC05"
|
|
35
|
+
d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.2C.92 16.46 0 20.12 0 24s.92 7.54 2.56 10.79l7.97-6.2z"
|
|
36
|
+
/>
|
|
37
|
+
<path
|
|
38
|
+
fill="#34A853"
|
|
39
|
+
d="M24 48c6.48 0 11.93-2.13 15.9-5.81l-7.73-5.99c-2.15 1.45-4.9 2.3-8.17 2.3-6.26 0-11.57-3.52-13.46-8.59l-7.97 6.2C6.51 42.62 14.62 48 24 48z"
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
|
|
43
|
+
<span>Sign in with Google</span>
|
|
17
44
|
</Button>
|
|
18
45
|
);
|
|
19
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authverse",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
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"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@semantic-release/github": "^12.0.2",
|
|
54
54
|
"@semantic-release/npm": "^13.1.2",
|
|
55
55
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
56
|
-
"@types/node": "^25.0.
|
|
56
|
+
"@types/node": "^25.0.2",
|
|
57
57
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
58
58
|
"semantic-release": "^25.0.2",
|
|
59
59
|
"tsup": "^8.5.0",
|