better-auth 1.6.3 → 1.6.4
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/package.mjs +1 -1
- package/dist/plugins/two-factor/index.mjs +1 -2
- package/package.json +10 -10
package/dist/package.mjs
CHANGED
|
@@ -189,13 +189,12 @@ const twoFactor = (options) => {
|
|
|
189
189
|
options,
|
|
190
190
|
hooks: { after: [{
|
|
191
191
|
matcher(context) {
|
|
192
|
-
return context.context.
|
|
192
|
+
return context.path === "/sign-in/email" || context.path === "/sign-in/username" || context.path === "/sign-in/phone-number";
|
|
193
193
|
},
|
|
194
194
|
handler: createAuthMiddleware(async (ctx) => {
|
|
195
195
|
const data = ctx.context.newSession;
|
|
196
196
|
if (!data) return;
|
|
197
197
|
if (!data?.user.twoFactorEnabled) return;
|
|
198
|
-
if (ctx.context.session) return;
|
|
199
198
|
const trustDeviceCookieAttrs = ctx.context.createAuthCookie(TRUST_DEVICE_COOKIE_NAME, { maxAge: trustDeviceMaxAge });
|
|
200
199
|
const trustDeviceCookie = await ctx.getSignedCookie(trustDeviceCookieAttrs.name, ctx.context.secret);
|
|
201
200
|
if (trustDeviceCookie) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -489,13 +489,13 @@
|
|
|
489
489
|
"kysely": "^0.28.14",
|
|
490
490
|
"nanostores": "^1.1.1",
|
|
491
491
|
"zod": "^4.3.6",
|
|
492
|
-
"@better-auth/core": "1.6.
|
|
493
|
-
"@better-auth/drizzle-adapter": "1.6.
|
|
494
|
-
"@better-auth/kysely-adapter": "1.6.
|
|
495
|
-
"@better-auth/memory-adapter": "1.6.
|
|
496
|
-
"@better-auth/mongo-adapter": "1.6.
|
|
497
|
-
"@better-auth/prisma-adapter": "1.6.
|
|
498
|
-
"@better-auth/telemetry": "1.6.
|
|
492
|
+
"@better-auth/core": "1.6.4",
|
|
493
|
+
"@better-auth/drizzle-adapter": "1.6.4",
|
|
494
|
+
"@better-auth/kysely-adapter": "1.6.4",
|
|
495
|
+
"@better-auth/memory-adapter": "1.6.4",
|
|
496
|
+
"@better-auth/mongo-adapter": "1.6.4",
|
|
497
|
+
"@better-auth/prisma-adapter": "1.6.4",
|
|
498
|
+
"@better-auth/telemetry": "1.6.4"
|
|
499
499
|
},
|
|
500
500
|
"devDependencies": {
|
|
501
501
|
"@lynx-js/react": "^0.116.3",
|
|
@@ -512,7 +512,7 @@
|
|
|
512
512
|
"happy-dom": "^20.8.9",
|
|
513
513
|
"listhen": "^1.9.0",
|
|
514
514
|
"msw": "^2.12.10",
|
|
515
|
-
"next": "^16.2.
|
|
515
|
+
"next": "^16.2.3",
|
|
516
516
|
"oauth2-mock-server": "^8.2.2",
|
|
517
517
|
"react": "^19.2.4",
|
|
518
518
|
"react-dom": "^19.2.4",
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
"@tanstack/solid-start": "^1.0.0",
|
|
532
532
|
"better-sqlite3": "^12.0.0",
|
|
533
533
|
"drizzle-kit": ">=0.31.4",
|
|
534
|
-
"drizzle-orm": "
|
|
534
|
+
"drizzle-orm": "^0.45.2",
|
|
535
535
|
"mongodb": "^6.0.0 || ^7.0.0",
|
|
536
536
|
"mysql2": "^3.0.0",
|
|
537
537
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|