11 lines
344 B
TypeScript
11 lines
344 B
TypeScript
import { createAuthClient } from 'better-auth/react'
|
|
|
|
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || '/studio'
|
|
const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3001'
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: `${appUrl}${basePath}/api/auth`,
|
|
})
|
|
|
|
export const { signIn, signOut, useSession } = authClient
|