[PR #4372] [MERGED] fix(demo): put get plans inside a sync function #5339

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4372
Author: @himself65
Created: 9/2/2025
Status: Merged
Merged: 9/3/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/02/plan


📝 Commits (2)

  • 9bc3c6b fix(demo): put get plans inside a sync function
  • e0fb8a4 fix: lint

📊 Changes

1 file changed (+35 additions, -25 deletions)

View changed files

📝 demo/nextjs/lib/auth.ts (+35 -25)

📄 Description

Summary by cubic

Moved subscription plan setup into a synchronous function that reads Stripe price IDs from environment variables with fallbacks. This fixes incorrect plan IDs across environments and keeps the 7-day trial behavior unchanged.


🔄 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/4372 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/2/2025 **Status:** ✅ Merged **Merged:** 9/3/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/02/plan` --- ### 📝 Commits (2) - [`9bc3c6b`](https://github.com/better-auth/better-auth/commit/9bc3c6b943a98e8ec9ba919b0330e89b5e703783) fix(demo): put get plans inside a sync function - [`e0fb8a4`](https://github.com/better-auth/better-auth/commit/e0fb8a418c9d4e2adc976b57618dfaa97c40b4f6) fix: lint ### 📊 Changes **1 file changed** (+35 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/lib/auth.ts` (+35 -25) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Moved subscription plan setup into a synchronous function that reads Stripe price IDs from environment variables with fallbacks. This fixes incorrect plan IDs across environments and keeps the 7-day trial behavior unchanged. <!-- 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:19:21 -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#5339