Skip to content

fix: pass runtime config to schema auth factory#365

Merged
onmax merged 1 commit into
mainfrom
fix/schema-runtime-config
Jun 24, 2026
Merged

fix: pass runtime config to schema auth factory#365
onmax merged 1 commit into
mainfrom
fix/schema-runtime-config

Conversation

@onmax

@onmax onmax commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Passes the resolved Nuxt runtime config into the schema-generation defineServerAuth factory instead of calling it with an empty object. This keeps eager runtimeConfig reads consistent with the runtime request path while preserving the empty fallback for direct loadUserAuthConfig callers.

The regression coverage now includes both the helper path and the NuxtHub schema-export fixture, where server/auth.config.ts eagerly reads runtimeConfig.public.app.routes.signUp during schema generation.

Closes #364

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nuxt-better-auth-docs Error Error Jun 23, 2026 1:14pm

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@onmax/nuxt-better-auth@365

commit: 762e3f0

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
better-auth 762e3f0 Jun 23 2026, 01:12 PM

@onmax onmax marked this pull request as ready for review June 23, 2026 13:16
@onmax onmax merged commit e7bd3cd into main Jun 24, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtimeConfig is {} during schema generation, crashing defineServerAuth factories that read it eagerly

1 participant