-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Support "exactOptionalPropertyTypes": true in tsconfig.json #6491
Description
Hello,
First of all, thanks for developing and maintaining this well-designed library.
There have been several issues with having "exactOptionalPropertyTypes": true in tsconfig.json. It would be great if Better Auth would support this setting by default.
Currently, the oidcProvider plugin has type errors with exactOptionalPropertyTypes enabled. Previously, the organization plugin had a similar issue. There are currently 6 open issues that reference this setting: https://github.com/better-auth/better-auth/issues?q=is%3Aissue%20exactOptionalPropertyTypes
Maybe better-auth would be more robust if its tsconfig.base.json would have "exactOptionalPropertyTypes": true as well.
Thanks for your attention to this matter!
Current vs. Expected behavior
Type errors when including oidcProvider in the plugins array
What version of Better Auth are you using?
1.4.4
System info
{
"system": {
"platform": "darwin",
"arch": "arm64",
"version": "Darwin Kernel Version 25.1.0: Mon Oct 20 19:30:01 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6031",
"release": "25.1.0",
"cpuCount": 16,
"cpuModel": "Apple M3 Max",
"totalMemory": "64.00 GB",
"freeMemory": "0.63 GB"
},
"node": {
"version": "v24.9.0",
"env": "development"
},
"packageManager": {
"name": "npm",
"version": "11.6.0"
},
"frameworks": [
{
"name": "react",
"version": "^19.2.0"
}
],
"databases": [
{
"name": "pg",
"version": "^8.16.3"
},
{
"name": "drizzle",
"version": "^0.44.7"
}
],
"betterAuth": {
"version": "^1.4.4",
"config": null
}
}Which area(s) are affected?
Types