[PR #5567] [MERGED] chore: fix config in demo #6089

Closed
opened 2026-03-13 12:47:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5567
Author: @himself65
Created: 10/25/2025
Status: Merged
Merged: 10/25/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/10/24/stateless-doc


📝 Commits (1)

  • 2f002bf chore: fix config in demo

📊 Changes

2 files changed (+11 additions, -4 deletions)

View changed files

📝 demo/stateless/src/lib/auth-client.ts (+1 -3)
📝 demo/stateless/src/lib/auth.ts (+10 -1)

📄 Description

Summary by cubic

Updated the stateless demo auth config to resolve baseURL dynamically on Vercel and removed the hardcoded client baseURL. This fixes mismatched URLs in preview/production and uses safe defaults locally.

  • Bug Fixes
    • Compute baseURL from VERCEL_ENV/VERCEL_URL for preview and BETTER_AUTH_URL for production; undefined for local dev.
    • Drop baseURL in createAuthClient to avoid client/server config mismatch.

🔄 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/5567 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/25/2025 **Status:** ✅ Merged **Merged:** 10/25/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/10/24/stateless-doc` --- ### 📝 Commits (1) - [`2f002bf`](https://github.com/better-auth/better-auth/commit/2f002bf077f5741e3cfaf6e7fc8738bdb37521bc) chore: fix config in demo ### 📊 Changes **2 files changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `demo/stateless/src/lib/auth-client.ts` (+1 -3) 📝 `demo/stateless/src/lib/auth.ts` (+10 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Updated the stateless demo auth config to resolve baseURL dynamically on Vercel and removed the hardcoded client baseURL. This fixes mismatched URLs in preview/production and uses safe defaults locally. - **Bug Fixes** - Compute baseURL from VERCEL_ENV/VERCEL_URL for preview and BETTER_AUTH_URL for production; undefined for local dev. - Drop baseURL in createAuthClient to avoid client/server config mismatch. <!-- End of auto-generated description by cubic. --> --- <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 12:47:16 -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#6089