Issue with better-auth v1.3.27 infering values

I have a better-auth instance with a custom session plugin. My code it was working well on the previous version v1.2.27. I had some errors with a 422 error so I upgraded the version. After the upgrade I started to get an issue with the createAuth method. I needed that method to let the backend and frontend have the types of the context. How I can address this issue? As far as I know a fix it could be to use the original better-auth type:
export function createAuth(
config: AuthServerConfig,
): ReturnType<typeof betterAuth> {
export function createAuth(
config: AuthServerConfig,
): ReturnType<typeof betterAuth> {
But with this type I'm not going to get the types of the custom session
No description
5 Replies
bekacru
bekacru2w ago
remove declration:true from your auth instance
Cristian Sotomayor
let me check that prop
Cristian Sotomayor
I removed the prop from the tsconfig, but I'm getting this error. I'm using tsdown to bundle the code on the auth package
No description
Cristian Sotomayor
I created a public repository with my issues https://github.com/csdev19/test-mi-condominio-app
GitHub
GitHub - csdev19/test-mi-condominio-app
Contribute to csdev19/test-mi-condominio-app development by creating an account on GitHub.
Cristian Sotomayor
the last commit have the parts where I'm struggling with

Did you find this page helpful?