feat(auth): add passkey support via better-auth

This commit is contained in:
Mauricio Siu
2026-08-02 16:36:44 -06:00
parent 11e93dde38
commit 7b0bcee652
13 changed files with 9429 additions and 1 deletions
+2
View File
@@ -1,4 +1,5 @@
import { apiKey } from "@better-auth/api-key";
import { passkey } from "@better-auth/passkey";
import { scim } from "@better-auth/scim";
import { sso } from "@better-auth/sso";
import { betterAuth } from "better-auth";
@@ -33,6 +34,7 @@ export const auth = betterAuth({
apiKey({ enableMetadata: true, references: "user" }),
sso(),
twoFactor(),
passkey(),
organization({
ac,
roles: { owner: ownerRole, admin: adminRole, member: memberRole },
+3
View File
@@ -1,5 +1,6 @@
import type { IncomingMessage } from "node:http";
import { apiKey } from "@better-auth/api-key";
import { passkey } from "@better-auth/passkey";
import { scim } from "@better-auth/scim";
import { sso } from "@better-auth/sso";
import * as bcrypt from "bcrypt";
@@ -374,6 +375,7 @@ const createBetterAuth = () =>
session: {
expiresIn: 60 * 60 * 24 * 3,
updateAge: 60 * 60 * 24,
freshAge: 0,
},
user: {
modelName: "user",
@@ -435,6 +437,7 @@ const createBetterAuth = () =>
},
}),
twoFactor(),
passkey(),
organization({
ac,
roles: {