fix: align auth env var naming with NEXT_PUBLIC_SITE_URL
This commit is contained in:
@@ -25,6 +25,9 @@ NEXT_PUBLIC_SITE_URL="https://localhost:3000"
|
|||||||
# Auth callback URL
|
# Auth callback URL
|
||||||
NEXT_PUBLIC_APP_URL="https://localhost:3000"
|
NEXT_PUBLIC_APP_URL="https://localhost:3000"
|
||||||
|
|
||||||
|
# Used by Better Auth trusted origins and auth client baseURL (same as NEXT_PUBLIC_SITE_URL)
|
||||||
|
NEXT_PUBLIC_BASE_URL="https://localhost:3000"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# BETTER AUTH
|
# BETTER AUTH
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import { adminClient, emailOTPClient, lastLoginMethodClient } from 'better-auth/
|
|||||||
import { passkeyClient } from '@better-auth/passkey/client'
|
import { passkeyClient } from '@better-auth/passkey/client'
|
||||||
|
|
||||||
export const authClient = createAuthClient({
|
export const authClient = createAuthClient({
|
||||||
baseURL: process.env.NEXT_PUBLIC_BASE_URL || "https://localhost:3000",
|
baseURL: process.env.NEXT_PUBLIC_SITE_URL || "https://localhost:3000",
|
||||||
plugins: [
|
plugins: [
|
||||||
emailOTPClient(),
|
emailOTPClient(),
|
||||||
passkeyClient(),
|
passkeyClient(),
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ export const auth = betterAuth({
|
|||||||
clientSecret: process.env.DISCORD_CLIENT_SECRET || "",
|
clientSecret: process.env.DISCORD_CLIENT_SECRET || "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
trustedOrigins: [process.env.NEXT_PUBLIC_BASE_URL || "https://localhost:3000"],
|
trustedOrigins: [process.env.NEXT_PUBLIC_SITE_URL || "https://localhost:3000"],
|
||||||
rateLimit: {
|
rateLimit: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
window: 60,
|
window: 60,
|
||||||
|
|||||||
Reference in New Issue
Block a user