Skip to content

fix(types): enforce auth endpoint methods#201

Merged
onmax merged 2 commits intomainfrom
docs/update-auth-fetch-ssr-guidance
Mar 1, 2026
Merged

fix(types): enforce auth endpoint methods#201
onmax merged 2 commits intomainfrom
docs/update-auth-fetch-ssr-guidance

Conversation

@onmax
Copy link
Collaborator

@onmax onmax commented Mar 1, 2026

Summary

  • remove fallback method inference for auth endpoint response typing
  • enforce explicit methods for non-GET auth endpoints in useAuthRequestFetch typings
  • add type tests for method validity and post-only endpoint behavior
  • update docs and faq for SSR-safe useUserSession().client usage and request method guidance

Tests

  • pnpm vitest run test/use-user-session.test.ts
  • pnpm vitest run test/infer-use-fetch-endpoints-types.test.ts

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 1, 2026

Open in StackBlitz

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

commit: 77294fb

@onmax onmax merged commit 5f2c7d2 into main Mar 1, 2026
2 checks passed
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