[PR #232] [MERGED] fix: baseUrl in vue client #20076

Closed
opened 2026-04-15 19:27:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/232
Author: @matserix
Created: 10/18/2024
Status: Merged
Merged: 10/18/2024
Merged by: @Bekacru

Base: mainHead: vue-fetch-url


📝 Commits (3)

  • 3e59510 fix: baseUrl in vue client for explicit urls
  • 3acfd1b style: revert formatting of imports
  • fb9a32d style: fix linting error

📊 Changes

1 file changed (+5 additions, -5 deletions)

View changed files

📝 packages/better-auth/src/client/vue.ts (+5 -5)

📄 Description

When an explicit baseUrl is defined in the client like shown in the docs. The website will throw following error since it currently tries to call //session.

Error thrown:
[nuxt] [useFetch] the request URL must not start with "//".

This pr uses the already implemented getBaseURL function which is used in other api calls as well, though it will still fallback to /api/auth in edge cases.


🔄 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/232 **Author:** [@matserix](https://github.com/matserix) **Created:** 10/18/2024 **Status:** ✅ Merged **Merged:** 10/18/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `vue-fetch-url` --- ### 📝 Commits (3) - [`3e59510`](https://github.com/better-auth/better-auth/commit/3e59510aa98af3a14bcf4b1f6b12f5907aa8e4db) fix: baseUrl in vue client for explicit urls - [`3acfd1b`](https://github.com/better-auth/better-auth/commit/3acfd1b1bd1dc412e9d869e968768e9af4731092) style: revert formatting of imports - [`fb9a32d`](https://github.com/better-auth/better-auth/commit/fb9a32ded022ce7f388f4ef1e749534df13e17b5) style: fix linting error ### 📊 Changes **1 file changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/client/vue.ts` (+5 -5) </details> ### 📄 Description When an explicit baseUrl is defined in the client like shown in the docs. The website will throw following error since it currently tries to call //session. Error thrown: `[nuxt] [useFetch] the request URL must not start with "//".` This pr uses the already implemented `getBaseURL` function which is used in other api calls as well, though it will still fallback to /api/auth in edge cases. --- <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-04-15 19:27:17 -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#20076