Skip to content

fix(auth): persist updateUser to server#112

Merged
onmax merged 2 commits intomainfrom
fix/update-user-persist
Feb 13, 2026
Merged

fix(auth): persist updateUser to server#112
onmax merged 2 commits intomainfrom
fix/update-user-persist

Conversation

@onmax
Copy link
Collaborator

@onmax onmax commented Feb 12, 2026

Closes #108

Problem

updateUser() only patched local reactive state, so changes were lost on session refresh because nothing was persisted to the server.

Behavior

  • On client: updateUser() persists with client.updateUser(updates).
  • Local state is patched optimistically first.
  • If the server call fails (throw or error payload), local user state is rolled back.
  • On SSR (no client available), updateUser() only patches local state.

Repros

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

Open in StackBlitz

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

commit: 0fd44e9

@onmax onmax force-pushed the fix/update-user-persist branch 3 times, most recently from 9431e6f to 73765b3 Compare February 12, 2026 20:28
@onmax onmax force-pushed the fix/update-user-persist branch from 48f8f10 to 7e88a4f Compare February 13, 2026 09:25
@onmax onmax merged commit 331d72e into main Feb 13, 2026
3 checks passed
@onmax onmax deleted the fix/update-user-persist branch February 13, 2026 09:56
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.

updateUser does not update Info on the server side

1 participant