feat(auth): implement login page and authentication middleware feat(sidebar): create sidebar component with user info and navigation links feat(api): establish API client for interacting with backend services
10 lines
364 B
TypeScript
10 lines
364 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
import { adminClient, usernameClient } from "better-auth/client/plugins";
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: process.env.NEXT_PUBLIC_CSMS_URL ?? "http://localhost:3001",
|
|
plugins: [usernameClient(), adminClient()],
|
|
});
|
|
|
|
export const { signIn, signOut, signUp, useSession } = authClient;
|