Skip to content

fix(types): preserve server auth inference for plugins#111

Merged
onmax merged 6 commits intomainfrom
fix/107-type-infer-dx
Feb 13, 2026
Merged

fix(types): preserve server auth inference for plugins#111
onmax merged 6 commits intomainfrom
fix/107-type-infer-dx

Conversation

@onmax
Copy link
Collaborator

@onmax onmax commented Feb 12, 2026

Summary

  • fix defineServerAuth typing with overloads so plugin tuples stay inferred without constraining plugin internals
  • keep nuxt-better-auth-infer typing inline in src/module/type-templates.ts and infer user/session fields from plugin schema + additionalFields
  • add a regression fixture + test for Route Rules TS not working properly #107 (admin-like plugin schema + user.additionalFields + route rules matcher)
  • remove manual playground AuthUser augmentation (/playground/app/types/auth.d.ts)

Tests

  • pnpm test test/type-infer-107.test.ts

Notes

@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@111

commit: d760ff9

@onmax onmax merged commit d41dcce into main Feb 13, 2026
2 checks passed
@onmax onmax deleted the fix/107-type-infer-dx branch February 13, 2026 08: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.

Route Rules TS not working properly

1 participant