Skip to content

update better-auth in solid convex example so @noble/ciphers passes trustPolicy#7656

Merged
Sheraff merged 2 commits into
mainfrom
chore-examples-better-auth-update
Jun 19, 2026
Merged

update better-auth in solid convex example so @noble/ciphers passes trustPolicy#7656
Sheraff merged 2 commits into
mainfrom
chore-examples-better-auth-update

Conversation

@Sheraff

@Sheraff Sheraff commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Updated a core authentication library to a newer version for improved stability and compatibility.
    • Improved TypeScript typing for the authentication options to strengthen compile-time validation.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5241947b-7cea-4a9d-aac8-36ea9ec03883

📥 Commits

Reviewing files that changed from the base of the PR and between c107483 and 105d0f6.

📒 Files selected for processing (1)
  • examples/solid/start-convex-better-auth/convex/auth.ts

📝 Walkthrough

Walkthrough

The better-auth dependency version in examples/solid/start-convex-better-auth/package.json is bumped from ^1.3.27 to ^1.6.19, and the auth module is updated to use the BetterAuthOptions generic type for type-safe configuration validation.

Changes

better-auth Upgrade with Type Safety

Layer / File(s) Summary
better-auth version bump
examples/solid/start-convex-better-auth/package.json
better-auth dependency constraint updated from ^1.3.27 to ^1.6.19.
Type-safe auth configuration
examples/solid/start-convex-better-auth/convex/auth.ts
BetterAuthOptions type is imported and applied as a generic parameter to the betterAuth call in createAuth for TypeScript compile-time validation of configuration options.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A hop, a skip, a version leap,
^1.6.19 now in our keep,
With types so safe, the rabbit cheers,
Type-checked auth dispels all fears! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions updating better-auth in a Solid Convex example, which aligns with the actual changes updating the better-auth dependency version and adding TypeScript typing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-examples-better-auth-update

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud

nx-cloud Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit c107483

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 3m 9s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 25s View ↗

☁️ Nx Cloud last updated this comment at 2026-06-19 17:33:00 UTC

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@socket-security

socket-security Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedbetter-auth@​1.6.19981008596100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Jun 19, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7656

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7656

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7656

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7656

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7656

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7656

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7656

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7656

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7656

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7656

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7656

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7656

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7656

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7656

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7656

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7656

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7656

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7656

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7656

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7656

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7656

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7656

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7656

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7656

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7656

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7656

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7656

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7656

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7656

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7656

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7656

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7656

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7656

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7656

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7656

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7656

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7656

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7656

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7656

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7656

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7656

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7656

commit: 105d0f6

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud is proposing a fix for your failed CI:

We updated convex/auth.ts to explicitly type the logger configuration as Logger | undefined, resolving a TypeScript incompatibility introduced by upgrading better-auth from ^1.3.27 to ^1.6.19. In v1.6, BetterAuthOptions.logger changed to Logger | undefined, causing @convex-dev/better-auth's contravariant DBAdapter<Options> type check to fail when TypeScript inferred the narrower { disabled: boolean } type. This fix widens the inferred options type so the build passes without weakening type safety.

Tip

We verified this fix by re-running tanstack-solid-start-example-convex-better-auth:build.

diff --git a/examples/solid/start-convex-better-auth/convex/auth.ts b/examples/solid/start-convex-better-auth/convex/auth.ts
index e9c2cdb4..d4d624b9 100644
--- a/examples/solid/start-convex-better-auth/convex/auth.ts
+++ b/examples/solid/start-convex-better-auth/convex/auth.ts
@@ -1,6 +1,7 @@
 import { createClient } from '@convex-dev/better-auth'
 import { convex } from '@convex-dev/better-auth/plugins'
 import { betterAuth } from 'better-auth'
+import type { BetterAuthOptions } from 'better-auth'
 import { components } from './_generated/api'
 import { query } from './_generated/server'
 import type { GenericCtx } from '@convex-dev/better-auth'
@@ -16,12 +17,10 @@ export const createAuth = (
   ctx: GenericCtx<DataModel>,
   { optionsOnly } = { optionsOnly: false },
 ) => {
-  return betterAuth({
+  return betterAuth<BetterAuthOptions>({
     // disable logging when createAuth is called just to generate options.
     // this is not required, but there's a lot of noise in logs without it.
-    logger: {
-      disabled: optionsOnly,
-    },
+    logger: { disabled: optionsOnly },
     baseURL: siteUrl,
     database: authComponent.adapter(ctx),
     // Configure simple, non-verified email/password to get started

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally Y75V-ijPn

Apply fix locally with your editor ↗   View interactive diff ↗



🎓 Learn more about Self-Healing CI on nx.dev

@Sheraff Sheraff merged commit 279a849 into main Jun 19, 2026
10 checks passed
@Sheraff Sheraff deleted the chore-examples-better-auth-update branch June 19, 2026 18:08
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.

1 participant