Skip to content

fix(dashboard): Use DB-less Better Auth initializer#456

Merged
dcramer merged 1 commit into
mainfrom
fix/dashboard-minimal-auth
May 31, 2026
Merged

fix(dashboard): Use DB-less Better Auth initializer#456
dcramer merged 1 commit into
mainfrom
fix/dashboard-minimal-auth

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented May 31, 2026

Switch the Junior dashboard to Better Auth's minimal initializer so DB-less dashboard auth no longer pulls Kysely adapter and migration code into Nitro production bundles. This matches the existing cookie-backed OAuth state and session cache configuration, and fixes the Rolldown missing-export failure from Better Auth's unused SQLite dialect chunks.

DB-less Auth Path

The dashboard still passes no database option and continues to store OAuth state and encrypted session cache in cookies. The auth config test now mocks better-auth/minimal so that contract stays explicit.

Bundle Verification

Verified a packed dashboard tarball in a throwaway Nitro/Vercel app with @sentry/junior@0.58.0: nitro build succeeds, the output contains better-auth/dist/context/init-minimal.mjs and @better-auth/memory-adapter, and an output scan found no @better-auth/kysely-adapter, DEFAULT_MIGRATION, or from "kysely" references.

Fixes #455

Use the minimal Better Auth entrypoint for dashboard auth so the Vercel production bundle does not pull in Kysely adapter and migration code that is unused by the cookie-backed dashboard flow.

The dashboard already avoids passing a database option and stores OAuth state and cached sessions in cookies, so the minimal initializer matches the intended auth mode.

Fixes GH-455
Co-Authored-By: GPT-5 Codex <codex@openai.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

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

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 31, 2026 3:28pm

Request Review

@dcramer dcramer marked this pull request as ready for review May 31, 2026 15:40
@dcramer dcramer merged commit b5e935e into main May 31, 2026
16 checks passed
@dcramer dcramer deleted the fix/dashboard-minimal-auth branch May 31, 2026 15:40
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.

junior-dashboard: @better-auth/kysely-adapter bun/d1 dialects import missing exports from kysely main entry

1 participant