ERROR: Password not found {email: xxx} #2108

Closed
opened 2026-03-13 09:27:50 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @zihaoyy on GitHub (Oct 12, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

When I log in using my email password, I get the following error: ERROR [Better Auth]: Password not found { email: xxx }

So I went into node_modules and found out through printing that the password field was undefined, but the password field in the database did have a value. Why is that?

Image Image Image

Current vs. Expected behavior

current: password: undefined
expected: have value

What version of Better Auth are you using?

1.3.27

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 25.0.0: Wed Sep 17 21:38:03 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T8112",
    "release": "25.0.0",
    "cpuCount": 8,
    "cpuModel": "Apple M2",
    "totalMemory": "16.00 GB",
    "freeMemory": "0.10 GB"
  },
  "node": {
    "version": "v24.3.0",
    "env": "development"
  },
  "packageManager": {
    "name": "npm",
    "version": "11.4.2"
  },
  "frameworks": null,
  "databases": null,
  "betterAuth": {
    "version": "Unknown",
    "config": null
  }
}

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

Client, Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  database: prismaAdapter(prisma, {
    provider: 'postgresql',
  }),
  emailAndPassword: {
    enabled: true,
    requireEmailVerification: true,
    async sendResetPassword(data) {
      const {user, url, token} = data
      await sendEmail({
        to: user.email,
        subject: 'Verify your email address',
        react: VerifyLinkEmailTemplate({url}),
        token,
      })
    },
  },
  emailVerification: {
    sendOnSignUp: true,
    autoSignInAfterVerification: true,
    sendVerificationEmail: async (data) => {
      const {user, url, token} = data
      await sendEmail({
        to: user.email,
        subject: 'Verify your email address',
        react: VerifyLinkEmailTemplate({url}),
        token,
      })
    },
  },
  account: {
    accountLinking: {
      enabled: true,
    },
  },
plugins: [
  nextCookies(),
  genericOAuth({
    config: [
      {
        providerId: 'wechat',
        clientId: 'test-client-id',
        clientSecret: 'test-client-secret',
        discoveryUrl:
          'https://auth.example.com/.well-known/openid-configuration',
      },
    ],
  }),
  emailOTP({
    allowedAttempts: 3,
    disableSignUp: false,
    otpLength: 6,
    expiresIn: 300,
    async sendVerificationOTP({email, otp, type}) {
      await sendEmail({
        to: email,
        subject: 'You got an verification code.',
        react: OtpCodeEmailTemplate({code: otp}),
      })
    },
  }),
],
});

Additional context

No response

Originally created by @zihaoyy on GitHub (Oct 12, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce When I log in using my email password, I get the following error: ERROR [Better Auth]: Password not found { email: xxx } So I went into node_modules and found out through printing that the password field was undefined, but the password field in the database did have a value. Why is that? <img width="682" height="379" alt="Image" src="https://github.com/user-attachments/assets/4c00b1df-2ed5-4615-94fb-4fba0d7a66d4" /> <img width="332" height="235" alt="Image" src="https://github.com/user-attachments/assets/1602e367-2f04-43f7-b0f8-001e581b29e2" /> <img width="1564" height="131" alt="Image" src="https://github.com/user-attachments/assets/24c20ab7-f513-410f-919c-349cab722c30" /> ### Current vs. Expected behavior current: password: undefined expected: have value ### What version of Better Auth are you using? 1.3.27 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 25.0.0: Wed Sep 17 21:38:03 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T8112", "release": "25.0.0", "cpuCount": 8, "cpuModel": "Apple M2", "totalMemory": "16.00 GB", "freeMemory": "0.10 GB" }, "node": { "version": "v24.3.0", "env": "development" }, "packageManager": { "name": "npm", "version": "11.4.2" }, "frameworks": null, "databases": null, "betterAuth": { "version": "Unknown", "config": null } } ``` ### Which area(s) are affected? (Select all that apply) Client, Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ database: prismaAdapter(prisma, { provider: 'postgresql', }), emailAndPassword: { enabled: true, requireEmailVerification: true, async sendResetPassword(data) { const {user, url, token} = data await sendEmail({ to: user.email, subject: 'Verify your email address', react: VerifyLinkEmailTemplate({url}), token, }) }, }, emailVerification: { sendOnSignUp: true, autoSignInAfterVerification: true, sendVerificationEmail: async (data) => { const {user, url, token} = data await sendEmail({ to: user.email, subject: 'Verify your email address', react: VerifyLinkEmailTemplate({url}), token, }) }, }, account: { accountLinking: { enabled: true, }, }, plugins: [ nextCookies(), genericOAuth({ config: [ { providerId: 'wechat', clientId: 'test-client-id', clientSecret: 'test-client-secret', discoveryUrl: 'https://auth.example.com/.well-known/openid-configuration', }, ], }), emailOTP({ allowedAttempts: 3, disableSignUp: false, otpLength: 6, expiresIn: 300, async sendVerificationOTP({email, otp, type}) { await sendEmail({ to: email, subject: 'You got an verification code.', react: OtpCodeEmailTemplate({code: otp}), }) }, }), ], }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 09:27:50 -05:00
Author
Owner

@Bekacru commented on GitHub (Oct 13, 2025):

Password is stored in the accounts table

@Bekacru commented on GitHub (Oct 13, 2025): Password is stored in the accounts table
Author
Owner

@zihaoyy commented on GitHub (Oct 14, 2025):

Password is stored in the accounts table

Of course, my third picture shows the password for the account table in the database

@zihaoyy commented on GitHub (Oct 14, 2025): > Password is stored in the accounts table Of course, my third picture shows the password for the account table in the database
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2108