13 lines
362 B
TypeScript
13 lines
362 B
TypeScript
import { createAuthClient } from 'better-auth/react';
|
|
import { magicLinkClient } 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: [
|
|
magicLinkClient()
|
|
]
|
|
});
|