feaeet: add passkeys support

This commit is contained in:
2026-03-10 22:46:51 +08:00
parent 476b48addb
commit d3d25d56d8
7 changed files with 358 additions and 67 deletions

View File

@@ -1,9 +1,10 @@
import { createAuthClient } from "better-auth/react";
import { adminClient, usernameClient } from "better-auth/client/plugins";
import { passkeyClient } from "@better-auth/passkey/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_CSMS_URL ?? "http://localhost:3001",
plugins: [usernameClient(), adminClient()],
plugins: [usernameClient(), adminClient(), passkeyClient()],
});
export const { signIn, signOut, signUp, useSession } = authClient;