mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-30 19:06:47 -05:00
chore: fix config in demo (#5567)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000",
|
||||
});
|
||||
export const authClient = createAuthClient();
|
||||
|
||||
export const { signIn, signOut, useSession } = authClient;
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
|
||||
const baseURL: string | undefined =
|
||||
process.env.VERCEL === "1"
|
||||
? process.env.VERCEL_ENV === "production"
|
||||
? process.env.BETTER_AUTH_URL
|
||||
: process.env.VERCEL_ENV === "preview"
|
||||
? `https://${process.env.VERCEL_URL}`
|
||||
: undefined
|
||||
: undefined;
|
||||
|
||||
export const auth = betterAuth({
|
||||
baseURL: process.env.BETTER_AUTH_URL,
|
||||
baseURL,
|
||||
secret: process.env.BETTER_AUTH_SECRET,
|
||||
|
||||
socialProviders: {
|
||||
|
||||
Reference in New Issue
Block a user