feat(app): added better auth for better auth stuff vs my home written broken one
This commit is contained in:
19
app/src/pkg/auth/auth-client.ts
Normal file
19
app/src/pkg/auth/auth-client.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { createAuthClient } from "better-auth/client";
|
||||
|
||||
import {
|
||||
inferAdditionalFields,
|
||||
usernameClient,
|
||||
adminClient,
|
||||
apiKeyClient,
|
||||
} from "better-auth/client/plugins";
|
||||
import type { auth } from "./auth.js";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: "http://localhost:3000",
|
||||
plugins: [
|
||||
inferAdditionalFields<typeof auth>(),
|
||||
usernameClient(),
|
||||
adminClient(),
|
||||
apiKeyClient(),
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user