Skip to content

fix(auth): defer logout redirect until next tick#286

Merged
onmax merged 1 commit intonuxt-modules:mainfrom
onmax:fix/logout-redirect-next-tick
Mar 22, 2026
Merged

fix(auth): defer logout redirect until next tick#286
onmax merged 1 commit intonuxt-modules:mainfrom
onmax:fix/logout-redirect-next-tick

Conversation

@onmax
Copy link
Copy Markdown
Collaborator

@onmax onmax commented Mar 22, 2026

Closes #283

Summary

  • wait one Vue tick before running the built-in logout redirect after clearSession()
  • keep the custom onSuccess path unchanged
  • add a focused unit regression that proves logout navigation runs after auth reactivity settles

Testing

  • pnpm vitest run test/use-user-session.test.ts

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 22, 2026

@onmax is attempting to deploy a commit to the maximogarciamartinez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 22, 2026

Open in StackBlitz

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

commit: 0fe23c0

@onmax onmax merged commit 900d135 into nuxt-modules:main Mar 22, 2026
3 of 4 checks passed
@onmax onmax deleted the fix/logout-redirect-next-tick branch March 22, 2026 14:51
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.

signOut() logout redirect silently fails

1 participant