createAuthClient ignoring base URL

I'am running next js app on localhost:3000 and my auth server on localhost:4000. When I call authClient.signUp.email method this is the request URL: http://localhost:3000/api/auth/sign-up/email

This is my auth client setup:
import { adminClient } from 'better-auth/client/plugins'
import { createAuthClient } from 'better-auth/react'

export const authClient = createAuthClient({
  plugins: [adminClient()],
  baseUrl: 'http://localhost:4000'
})


I am on v1.1.14 both client and sercer
Was this page helpful?