TwoFactor plugins requires id column in schema?
I'm getting the following error message, when calling
authClient.twoFactor.enable
:
AFAIK, the twoFactor table doesn't need an ID column and the documentation doesn't mention one.
Config:
5 Replies
This is my table configuration

GitHub
TwoFactor expects id column · Issue #1711 · better-auth/better-auth
Is this suited for github? Yes, this is suited for github To Reproduce Database schema according to documentation: export const twoFactors = pgTable('twoFactor', { userId: text() .primaryKe...
add
id
field in your schema. follow the schema on the docsTwo-Factor Authentication (2FA) | Better Auth
Enhance your app's security with two-factor authentication.
Solution
will be updated