mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-06-15 12:00:29 -04:00
* 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>
26 lines
655 B
TypeScript
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(),
|
|
],
|
|
});
|