legal-consent plugin not extending authClient.signUp.email
Hi all!
Just getting to know the plugin ecosystem of better-auth and I must say I am very happy with better-auth so far!
When using the legal-consent plugin I have hit a snag, it doesn't seem like it's extending the auth client properly and thus won't pass the
tosAccepted
and privacyPolicyAccepted
fields through to the database resulting in DB errors due to a missing field.
I also get the following TS error on the client implementation in the frontend:
Does anyone have a reference implementation of this plugin or can anyone confirm that it works?
10 Replies

Hey @Johan K I'll look into this.
By the way, this is part of Better-Auth-Kit, not part of Better-Auth directly.
Just an FYI ^ But it's no worries, I'm the creator of BA kit, so I'll look into this 😁
Sorry about that! I've now found the correct discord :)
Thank you for looking into it!
Would it be suitable to repost in the other community as well for tracking purposes or is it fine keeping it here?
It's fine over here
Hey so I've made some changes to the plugin, please install the latest version.
All of your concerns should be address on the legal consent documentation which I've updated.
https://www.better-auth-kit.com/docs/plugins/legal-consent
Thank you for this, I've just gotten the change to try it. Sadly I'm still facing an issue as it is not only the type being extended, but it's not passing the variable to the database at all
You need to run the better-auth migration CLI
if you haven't already
The columns exist in the database, they're just not getting passed from better-auth to Prisma
@Ping Have you had the time to replicate this?
Hey sorry, been super busy, will look into this asap!
By the way, this is definitely an issue on our end. Apologies for that.
Hey I just added tests to the legal-consent plugin, and everything looks good on my end. It seems I was wrong about my assumption.
Let me know of there's anything I can do