better-auth/client internal fetch logic gets overridden or ignored #1155

Closed
opened 2026-03-13 08:25:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @im-Qarch on GitHub (May 3, 2025).

I'm using better-auth/vue in my Nuxt 3 app to call my custom backend API.

When I pass a baseURL to createAuthClient, it seems like all the internal fetch logic (like headers, payload serialization, etc.) gets overridden or ignored.

Here's my usage:

import { createAuthClient } from 'better-auth/vue'

export function useApi() {
  const authService = createAuthClient({
    baseURL: `${useRuntimeConfig().public.BASE_API_URL}`,
  })

  return {
    authService,
  }
}```
Originally created by @im-Qarch on GitHub (May 3, 2025). I'm using `better-auth/vue` in my Nuxt 3 app to call my custom backend API. When I pass a `baseURL` to `createAuthClient`, it seems like all the internal fetch logic (like headers, payload serialization, etc.) gets overridden or ignored. Here's my usage: ```ts import { createAuthClient } from 'better-auth/vue' export function useApi() { const authService = createAuthClient({ baseURL: `${useRuntimeConfig().public.BASE_API_URL}`, }) return { authService, } }```
Author
Owner

@dosubot[bot] commented on GitHub (Aug 2, 2025):

Hi, @im-Qarch. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in a Nuxt 3 app, using better-auth/vue with a custom baseURL passed to createAuthClient causes the internal fetch logic (headers, payload serialization) to be overridden or ignored.
  • You provided a code snippet demonstrating your setup with the custom baseURL.
  • There has been no further activity or comments on this issue since your initial report.
  • The issue remains unresolved and no workaround or fix has been identified yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of better-auth by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 2, 2025): Hi, @im-Qarch. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in a Nuxt 3 app, using better-auth/vue with a custom baseURL passed to createAuthClient causes the internal fetch logic (headers, payload serialization) to be overridden or ignored. - You provided a code snippet demonstrating your setup with the custom baseURL. - There has been no further activity or comments on this issue since your initial report. - The issue remains unresolved and no workaround or fix has been identified yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of better-auth by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1155