Cannot set additionalField when calling signUp.email
I'm trying to pass a
referredBy
field during user registration using signUp.email
, but TypeScript is rejecting it with the following error:
"Object literal may only specify known properties, and 'referredBy' does not exist in type "
1. I've properly configured referredBy
in my auth.ts
configuration:
2. In my RegisterForm.tsx
, I'm trying to pass the field like this:
25 Replies
My auth-client looks like this
Are you sure you're importing
auth
correctly?
usually local import pathnames are ./auth
yes the absolute path resolves correctly for "auth"
From what you provided, it looks fine to me.
Do you think you can show me your whole auth.ts file?
@Ping
Can you remove
plugins: []
? Sometimes that can mess up typesno luck 😦
it is possible right to add the additional fields into signUp.email({})?
because I want to set the referredBy when signing up
Yeah what you're doing is right, when I test on my end, it works.

Some random strange thing is blocking the types for some reason.
yes very strange. How does your auth-client.ts look like?
ah thanks I see the issue
Solution
I had plugins indented
Oh my goodness!
XD I didn't catch that
thanks so much 🙂
I wonder why it didn't give you type errs here tho 🤔

yeah it allowed me to do that 😛
huh, well, that's unlucky I guess 🤣
Anyway, I'm glad it's solved.
🙂 amazing!
Also love better-auth-kit, I'm using it with convex
do you think it will work with the stripe plugin in that setup as well?
I saw that 🔥🔥
How is convex adapter going for you? Any troubles with it?
I'm honestly not sure, I haven't tested it 👀
Very smooth 🙂
Roadmap looks good too. If it could also generate the schema for me that would save some time.
Awesome! Good to hear :)
If you do run into any issues regarding the adapter, just LMK!