[PR #2218] [CLOSED] fix(vue): baseURL not working #4205

Closed
opened 2026-03-13 11:37:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2218
Author: @yooouuri
Created: 4/11/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

📊 Changes

1 file changed (+3 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/client/vue/index.ts (+3 -4)

📄 Description

~/utils/auth.ts

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

const { useSession, signIn, signUp } = createAuthClient({
  baseURL: 'http://localhost:8000',
})

export default {
  useSession,
  signIn,
  signUp,
}

page.vue

const { data: session } = await auth.useSession(useFetch)

The baseURL is not merged into the actual url for the API call.

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/2218 **Author:** [@yooouuri](https://github.com/yooouuri) **Created:** 4/11/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`004b46d`](https://github.com/better-auth/better-auth/commit/004b46d965902307caa42f5fbd3a0530e626111d) fix: baseURL not working ### 📊 Changes **1 file changed** (+3 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/client/vue/index.ts` (+3 -4) </details> ### 📄 Description ~/utils/auth.ts ```ts import { createAuthClient } from 'better-auth/vue' const { useSession, signIn, signUp } = createAuthClient({ baseURL: 'http://localhost:8000', }) export default { useSession, signIn, signUp, } ``` page.vue ```ts const { data: session } = await auth.useSession(useFetch) ``` The baseURL is not merged into the actual url for the API call. <img width="960" alt="image" src="https://github.com/user-attachments/assets/94cc4d2b-4897-4539-926f-54bede0d940c" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:37:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#4205