Skip to content

fix(auth): avoid deep session snapshot watches - #414

Merged
onmax merged 1 commit into
mainfrom
fix/session-watcher-recursion
Aug 26, 2026
Merged

fix(auth): avoid deep session snapshot watches#414
onmax merged 1 commit into
mainfrom
fix/session-watcher-recursion

Conversation

@onmax

@onmax onmax commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The client session bridge now watches Better Auth snapshot replacements without traversing the snapshot deeply. Nested session mutations no longer retrigger the bridge and replace Nuxt session state, while normal Better Auth refreshes still synchronize because the session atom publishes a new top-level snapshot.

Tests

  • corepack pnpm exec vitest run test/use-user-session.test.ts --maxWorkers=1
  • corepack pnpm exec vitest run test/define-server-auth-literal-inference.test.ts --maxWorkers=1
  • corepack pnpm lint
  • corepack pnpm typecheck
  • corepack pnpm prepack

@vercel

vercel Bot commented Aug 26, 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 Ready Ready Preview Aug 26, 2026 8:08am

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/better-auth@414

commit: 9b3a221

@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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
better-auth 9b3a221 Commit Preview URL

Branch Preview URL
Aug 26 2026, 08:08 AM

@onmax
onmax merged commit 462a4e7 into main Aug 26, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 26, 2026
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