Files
zerobyte/app/client/lib/auth-client.ts
Nico 283de054ec feat(authentication): api key (#966)
* feat(authentication): api key

Keeps selected UX pieces from b487b096.

Co-authored-by: Nguyen Quy Hy <nguyenquyhy@live.com.sg>

* refactor: pr feedbacks

* chore: bump @better-auth/api-key

* refactor: global limit of 50 api key instead of 10 per org

---------

Co-authored-by: Nguyen Quy Hy <nguyenquyhy@live.com.sg>
2026-06-12 20:14:21 +02:00

26 lines
655 B
TypeScript

import { createAuthClient } from "better-auth/react";
import {
twoFactorClient,
usernameClient,
adminClient,
organizationClient,
inferAdditionalFields,
} from "better-auth/client/plugins";
import { ssoClient } from "@better-auth/sso/client";
import { passkeyClient } from "@better-auth/passkey/client";
import { apiKeyClient } from "@better-auth/api-key/client";
import type { auth } from "~/server/lib/auth";
export const authClient = createAuthClient({
plugins: [
inferAdditionalFields<typeof auth>(),
usernameClient(),
adminClient(),
organizationClient(),
ssoClient(),
twoFactorClient(),
passkeyClient(),
apiKeyClient(),
],
});