[PR #8820] chore: fix type inference for future TS compatibility #16482

Closed
opened 2026-04-13 10:32:18 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/8820

State: closed
Merged: Yes


Apply the same NoInfer<O> fix from #6643 and #6689 to the SSO plugin. Without this, tsgo collapses O to Record<string, any> when sso() is used inside betterAuth({ plugins: [...] }), causing TS7031 errors in callback parameters like provisionUser.


Summary by cubic

Fixes type inference in the SSO plugin by wrapping options with NoInfer<O> to stop TypeScript from collapsing them to Record<string, any> when used in betterAuth({ plugins: [...] }). Prevents TS7031 errors in callbacks like provisionUser and improves future TypeScript compatibility.

Written for commit 7f224c9871. Summary will update on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8820 **State:** closed **Merged:** Yes --- Apply the same `NoInfer<O>` fix from #6643 and #6689 to the SSO plugin. Without this, tsgo collapses O to Record<string, any> when sso() is used inside betterAuth({ plugins: [...] }), causing TS7031 errors in callback parameters like provisionUser. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes type inference in the SSO plugin by wrapping `options` with `NoInfer<O>` to stop TypeScript from collapsing them to `Record<string, any>` when used in `betterAuth({ plugins: [...] })`. Prevents TS7031 errors in callbacks like `provisionUser` and improves future TypeScript compatibility. <sup>Written for commit 7f224c98713b690d32ddd77de4f1f8877a560df5. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 10:32:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16482