auth.api.getUser didn't get the additionalFields for typescript

Hello, I'm getting user information by something like

const user = await auth.api.getUser({ query: { id: userId, }, headers: fromNodeHeaders(req.headers), }); if (!user) { return res.status(404).json({ error: 'User not found' }); } if (user.firebaseUid) { ... }

the value is there, so I can use it normally but typescript keeps saying that it does not exists, it there any way to make this getUser use the type generated by additionalFields?

I'm using better-auth 1.4.2 on node.js
Was this page helpful?