15 lines
440 B
TypeScript
15 lines
440 B
TypeScript
import { createAuthClient } from 'better-auth/react';
|
|
import { adminClient, magicLinkClient, organizationClient } from 'better-auth/client/plugins';
|
|
import { resolveApiBaseURL } from '@/lib/runtime-url';
|
|
|
|
const baseURL = resolveApiBaseURL(process.env.NEXT_PUBLIC_API_URL);
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: baseURL || undefined,
|
|
plugins: [
|
|
adminClient(),
|
|
magicLinkClient(),
|
|
organizationClient()
|
|
]
|
|
});
|