Merge pull request 'fix(web): use internal Convex URL on auth pages' (#22) from t3code/fix-auth-pages-convex-url into main

This commit was merged in pull request #22.
This commit is contained in:
joshuafhiggins committed 2026-10-08 15:41:43 -04:00
commit 26bea15b20
3 files changed
+15 -2

No files matched your search

+6 -1
View File
@@ -1,11 +1,16 @@
import { fetchQuery } from "convex/nextjs"
import { connection } from "next/server"
import { AuthForm } from "@/components/auth-form"
import { convexServerOptions } from "@/lib/convex-server"
import { api } from "@otunes/convex/_generated/api"
export default async function SignInPage() {
await connection()
const { disableAccountCreation } = await fetchQuery(api.users.getAppSettings)
const { disableAccountCreation } = await fetchQuery(
api.users.getAppSettings,
{},
convexServerOptions()
)
return (
<AuthForm flow="signIn" accountCreationDisabled={disableAccountCreation} />
+6 -1
View File
@@ -1,11 +1,16 @@
import { fetchQuery } from "convex/nextjs"
import { connection } from "next/server"
import { AuthForm } from "@/components/auth-form"
import { convexServerOptions } from "@/lib/convex-server"
import { api } from "@otunes/convex/_generated/api"
export default async function SignUpPage() {
await connection()
const { disableAccountCreation } = await fetchQuery(api.users.getAppSettings)
const { disableAccountCreation } = await fetchQuery(
api.users.getAppSettings,
{},
convexServerOptions()
)
return (
<AuthForm flow="signUp" accountCreationDisabled={disableAccountCreation} />
+3
View File
@@ -97,6 +97,9 @@ log "Starting web server"
cd /app
export HOME=/app NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0
export CONVEX_INTERNAL_URL="$BACKEND_URL"
# Server-side Convex helpers fall back to this at runtime. The browser bundle
# is built without it, so browsers still derive their own URL.
export NEXT_PUBLIC_CONVEX_URL="$BACKEND_URL"
exec setpriv --reuid=otunes --regid=otunes --init-groups \
"$NODE" apps/web/server.js
) &