"idToken" does not exist - not in documentation? #490

Closed
opened 2026-03-13 07:49:46 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @luskin on GitHub (Dec 29, 2024).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create a custom schema using the details provided in the documentation here
  2. Attempt to sign-in with a new social provider for an email that already exists in your user table
  3. Receive the following error: The field "idToken" does not exist in the "authAccount" schema

Current vs. Expected behavior

According the documentation here, there is no mention of any column/property idToken. When attempting to link an account, however, we are receiving the error The field "idToken" does not exist in the "authAccount" schema. This leads me to believe the documentation is out-of-date?

What version of Better Auth are you using?

1.1.4

Provide environment information

- OS: Mac OS X

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

export const auth = betterAuth({
  secret: env.AUTH_SECRET,

  socialProviders: {
    google: {
      enabled: true,
      clientId: env.AUTH_GOOGLE_CLIENT_ID,
      clientSecret: env.AUTH_GOOGLE_CLIENT_SECRET,
    },
  },

  plugins: [nextCookies()],

  database: drizzleAdapter(database, {
    provider: 'pg',
    schema: {
      ...schema,
      user: schema.users,
    },
  }),
  account: {
    modelName: 'authAccount',
  },
  session: {
    modelName: 'authSession',
  },
  user: {
    modelName: 'users',
    fields: {
      name: 'fullName',
      image: 'imageUrl',
    },
    additionalFields: {
      firstName: {
        type: 'string',
        required: true,
        fieldName: 'firstName',
      },
      lastName: {
        type: 'string',
        required: true,
        fieldName: 'lastName',
      },
    },
  },
  verification: {
    modelName: 'authVerification',
  },
  advanced: {
    generateId: false,
  },
})

Additional context

No response

Originally created by @luskin on GitHub (Dec 29, 2024). ### Is this suited for github? - [X] Yes, this is suited for github ### To Reproduce 1. Create a custom schema using the details provided in the documentation [here](https://www.better-auth.com/docs/concepts/database) 2. Attempt to sign-in with a new social provider for an email that already exists in your user table 3. Receive the following error: `The field "idToken" does not exist in the "authAccount" schema` ### Current vs. Expected behavior According the documentation [here](https://www.better-auth.com/docs/concepts/database), there is no mention of any column/property `idToken`. When attempting to link an account, however, we are receiving the error `The field "idToken" does not exist in the "authAccount" schema`. This leads me to believe the documentation is out-of-date? ### What version of Better Auth are you using? 1.1.4 ### Provide environment information ```bash - OS: Mac OS X ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript export const auth = betterAuth({ secret: env.AUTH_SECRET, socialProviders: { google: { enabled: true, clientId: env.AUTH_GOOGLE_CLIENT_ID, clientSecret: env.AUTH_GOOGLE_CLIENT_SECRET, }, }, plugins: [nextCookies()], database: drizzleAdapter(database, { provider: 'pg', schema: { ...schema, user: schema.users, }, }), account: { modelName: 'authAccount', }, session: { modelName: 'authSession', }, user: { modelName: 'users', fields: { name: 'fullName', image: 'imageUrl', }, additionalFields: { firstName: { type: 'string', required: true, fieldName: 'firstName', }, lastName: { type: 'string', required: true, fieldName: 'lastName', }, }, }, verification: { modelName: 'authVerification', }, advanced: { generateId: false, }, }) ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 07:49:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 12, 2025):

Hi, @luskin. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You identified a problem with the Better Auth library regarding the missing "idToken" field in the "authAccount" schema.
  • This field is not mentioned in the current documentation, suggesting a mismatch between implementation and documentation.
  • You requested clarification or an update to the documentation.
  • No further activity or comments have been made on the issue.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jun 12, 2025): Hi, @luskin. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You identified a problem with the Better Auth library regarding the missing "idToken" field in the "authAccount" schema. - This field is not mentioned in the current documentation, suggesting a mismatch between implementation and documentation. - You requested clarification or an update to the documentation. - No further activity or comments have been made on the issue. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If no updates are provided, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#490