Skip to content

Commit 84b9d76

Browse files
committed
fix(subscriptions): fix disabled subs
1 parent 7169f33 commit 84b9d76

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/sim/lib/auth-client.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { stripeClient } from '@better-auth/stripe/client'
22
import { emailOTPClient, genericOAuthClient, organizationClient } from 'better-auth/client/plugins'
33
import { createAuthClient } from 'better-auth/react'
4-
import { isProd } from '@/lib/environment'
54

65
const clientEnv = {
76
NEXT_PUBLIC_VERCEL_URL: process.env.NEXT_PUBLIC_VERCEL_URL,
@@ -32,7 +31,7 @@ export const client = createAuthClient({
3231
emailOTPClient(),
3332
genericOAuthClient(),
3433
// Only include Stripe client in production
35-
...(isProd
34+
...(clientEnv.NODE_ENV === 'production'
3635
? [
3736
stripeClient({
3837
subscription: true, // Enable subscription management
@@ -47,7 +46,7 @@ export const { useSession, useActiveOrganization } = client
4746

4847
export const useSubscription = () => {
4948
// In development, provide mock implementations
50-
if (!isProd) {
49+
if (clientEnv.NODE_ENV === 'development') {
5150
return {
5251
list: async () => ({ data: [] }),
5352
upgrade: async () => ({

0 commit comments

Comments
 (0)